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.
I had done the same before seeing discussions but I used j=i and I got wrong answer in the case of AND operator but after using j=i+1 the results matched. Will you explain why j=i was giving wrong answer for AND operator?
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Bitwise Operators
You are viewing a single comment's thread. Return to all comments →
I had done the same before seeing discussions but I used j=i and I got wrong answer in the case of AND operator but after using j=i+1 the results matched. Will you explain why j=i was giving wrong answer for AND operator?