You are viewing a single comment's thread. Return to all comments →
Bit shifting:
int solveMeFirst(int a, int b) { while (b != 0) { int carry = a & b; a = a ^ b; b = carry << 1; } return a; }
Seems like cookies are disabled on this browser, please enable them to open this website
An unexpected error occurred. Please try reloading the page. If problem persists, please contact support@hackerrank.com
Solve Me First
You are viewing a single comment's thread. Return to all comments →
Bit shifting: