Every time the time limit exceeds !Please review my code
Every time the time limit exceeds !Please review my code
hi @Varun_a19 while you’re finding the position of the set bit in the ans, the while loop should look like
while((temp&1)==0)
{ pos++;
temp=temp>>1;
}
but you have used the condition (temp & 1) != 0
but it isnt working i have fixed that
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.