Maximizing XOR Discussions | Algorithms | HackerRank
  • [deleted]
    + 0 comments

    No, it is not, it's actually O(log2(R)), finding the most significant bit is not constant.

    I was just a bit naive, and didn't see that in my case
    b = f(R) = log2(R)