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.
For this solution you need only non-repeating k and k-1 in set. With possible repeating case you need only check if there more then one k-1. This solution will not work only if you don't have k and k-1 in set. Yes, as far as I understand, this solution has restrictions, just not as strong as you say.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Day 29: Bitwise AND
You are viewing a single comment's thread. Return to all comments →
For this solution you need only non-repeating k and k-1 in set. With possible repeating case you need only check if there more then one k-1. This solution will not work only if you don't have k and k-1 in set. Yes, as far as I understand, this solution has restrictions, just not as strong as you say.