Maximizing XOR Discussions | Algorithms | HackerRank
  • + 1 comment

    Yes, you can do that. I subtract from 31 since I like to number the bits 0 to 31 (from right to left). If you subtract from 32, it's kind of like numbering the bits 1 to 32.

    HackerRank solutions.