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.
Consecutive 1's in Binary Numbers
Consecutive 1's in Binary Numbers
Sort by
recency
|
81 Discussions
|
Please Login in order to post a comment
python3
hi
this problem solution can be optimize further. here is the trick to solve this problem in O(K).
https://youtu.be/bc7cxeDy308
Those who are looking for javascript solution
Stack stack=new Stack(); int count=1,i=-1,max=0; while(n!=0) { stack.push(n%2); n=n/2; } while(!stack.isEmpty()) { if(stack.peek()==i) { count++; }
When we state real estate logos design, we mean a brand mark which has a capacity to impart in the interest of their business to the world. It's anything but a medium-term work for it requires a broad research work about the most recent real estate logo design patterns and contender's image imprint to think of something that is one of a kind, captivating and eye-getting.