Time limit error in playing with bits problem

my test case is not passing due to time limit error.
please suggest some changes

Hello @1998navdeep,

This is happening because your code is unable to move out of inner for loop.
What could be the reason?
Obviously, j.
Because, when j = end+1 the inner loop will terminate.

Thus, there is a problem in logic.
Think.

Hope, this would help.
Let me know if are unable to resolve it.
Give a like, if you are satisfied.

thanks a lot,sir for your help!

Please, mark the doubt as resolved.
BTW i wont mind a like.:joy:

1 Like