I want hint for longest subset problem and also prateek bhaiya should add more videos on problem like tavas and saddas
Hint for Longest subset problem in hackerblocks
Consider n has x digits, f(i) = decimal representation of binary string i, m is a binary string of size x and its i - th digit is 0 if and only if the i - th digit of n is 4. Finally, answer equals to 2^1 + 2^2 + … + 2^(x - 1) + f(m) + 1.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.