Dynamic Programming, Programming, Algorithms, Data, Coding Interviews.
multiply the possibility for all m characters, which is 2^m (multiply 2 m number of times). If we ignore the possibility of empty subsequences, the total number of subsequences = 2^m — 1. Similarly, string Y of size n has 2^n — 1 subsequence. Let's understand this with an example. Suppose X[] =