So as the title says, given a binary string of length n (1<=n<=10^5) , find the number of unique decimals that can be obtained from subsequences of the binary string:
Example : 101
01 (same as 1) so rejected
So, number of unique decimals are 5. I can only think of recursive solution.
How to approach this question ?
Btw it was asked today in Google hiring contest.