Given astring S andastring T, count thenumberof distinct subsequences of S which equals T.
A subsequence ofastring is anewstring which is formed fromthe original stringby deleting some (can be none) ofthecharacterswithout disturbing therelative positions ofthe remaining characters. (ie, "ACE" is a subsequence of"ABCDE"while"AEC" is not).
Here is an example:
S = "rabbbit", T = "rabbit"
Return 3.
Given a string S and a string T, count the number of distinct subsequences of S which equals T.A subsequence of a string is a new string which is formed from the original string by deleting some (can b