We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
thankyou so very much for this. i was working with list and everybody here provides a solution with a binary number in an integer variable. thanks alot for help.
Consecutive 1's in Binary Numbers
You are viewing a single comment's thread. Return to all comments →
Those who are looking for javascript solution
thankyou so very much for this. i was working with list and everybody here provides a solution with a binary number in an integer variable. thanks alot for help.
glad i could
hi
your solution is good but it can be optimize further. here is the trick to solve this problem in O(K).
https://youtu.be/bc7cxeDy308