Given strings s and t, return the number of distinct subsequences of s which equals t.
dp[i][j] = number of ways to form t[0..j-1] from s[0..i-1]. If s[i-1]==t[j-1]: dp[i][j] = dp[i-1][j-1] + dp[i-1][j]. Else: dp[i][j] = dp[i-1][j].
- dp[i][0] = 1 (empty t matched by any prefix of s).
- dp[0][j] = 0 for j > 0.
- Fill table: if match, add both using current s char and skipping it.
- Return dp[m][n].
- Time Complexity: O(M*N)
- Space Complexity: O(M*N)