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.
@AbhishekVermaIIT Hey, coming from java I'm not able to get what are you trying to do with n &= (n<<1) and your logic of "left-shift". Can you plese explain with a small example, say 13? Thank you very much.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Consecutive 1's in Binary Numbers
You are viewing a single comment's thread. Return to all comments →
@AbhishekVermaIIT Hey, coming from java I'm not able to get what are you trying to do with n &= (n<<1) and your logic of "left-shift". Can you plese explain with a small example, say 13? Thank you very much.