235. Distinct Subsequences

Hard · Dynamic Programming

Given strings `s` and `t`, return the number of distinct subsequences of `s` which equals `t`.

Examples

Example 1
Input: s="rabbbit", t="rabbit"
Output: 3
Explanation: Three ways to choose which 'b' to remove

Constraints