You are viewing a single comment's thread. Return to all comments →
C++ (more at https://github.com/IhorVodko/Hackerrank_solutions/tree/master , feel free to give a star :) )
int maximizingXor( int _min , int _max ){ size_t msbPosit = 0; while(_min ^ _max){ ++msbPosit; _min >>= 1; _max >>= 1; } return (1 << msbPosit) - 1; }
Seems like cookies are disabled on this browser, please enable them to open this website
Maximizing XOR
You are viewing a single comment's thread. Return to all comments →
C++ (more at https://github.com/IhorVodko/Hackerrank_solutions/tree/master , feel free to give a star :) )