Hi All: can Anybody explain to me in details how you get this solution. I am not getting it. Thanks

Problem: Given a string S and a string T, count the number of distinct subsequences of T in S....