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.
Well explained. The key is to find the first bit among all the inputs where they don't have the same bit value. and also separate the inputs into two parts. For instance:
000100
000101
.......
000111
The following part is to calcuate xor(a from the above part of the array, b from the down part of the array). I saw someone mentioned to use tree structure, I am sure it works as well.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Yet Another Minimax Problem
You are viewing a single comment's thread. Return to all comments →
Well explained. The key is to find the first bit among all the inputs where they don't have the same bit value. and also separate the inputs into two parts. For instance: 000100
000101
.......
000111
The following part is to calcuate xor(a from the above part of the array, b from the down part of the array). I saw someone mentioned to use tree structure, I am sure it works as well.