Closed xqian closed 11 years ago
Distinct Subsequences http://leetcode.com/onlinejudge#question_115
Problem: S1[0,n] S2[0,m] how many delete plan for S1[0,n] can make S1 becomes S2;
f(n,m)= if S1[n-1]==S2[m-1] f(n-1, m-1)+f(n-1,m) if S1[n-1]!=S2[m-1] f(n-1,m)
Distinct Subsequences http://leetcode.com/onlinejudge#question_115