Dynamic Programming, Programming, Algorithms, Data, Coding Interviews.
space is very large. If string X has size m, then there will be 2^m — 1 possible subsequence. How? The idea is simple! There would be two choices for each character in a string: Either it is part of the subsequence or not part of the subsequence. To find the total number of subsequences, we need to