at time 8:10, in for loop, what is the use of " 1<<n " ?
One syntax doubt
hello @chandreshmaurya
it is the euivalent to 2^n .
to generate all subset we iterate from 0 to 2^n-1 . thats why we are using 1<<n condition in the loop
2^n-1 binary representation will have all number set.
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.