Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
Can we first solve a simpler problem? Counting the number of subsequences with 1s followed by 0s.
How can we keep track of the partially matched subsequences to help us find the answer?