Given two strings S and T of length n and m respectively. find count of distinct occurrences of T in S as a sub-sequence.
- Time : O(nm)
- Space : O(nm)
c++
1 | class Solution { |