Maximizing XOR Discussions | Algorithms | HackerRank
  • + 0 comments

    Your version of the code works also. I used 31 instead of 32 since I count the 32 bits from 0 to 31 instead of 1 to 32. That is, I count the leftmost bit as the 31st bit, and the rightmost bit as the 0th bit.

    HackerRank solutions.