class Solution {
public:
int getSum(int a, int b) {
int sum = a;
while (b!=0) {
sum = a^b;
b = (a&b)<<1;
a = sum;
}
return a;
}
};
Sum of Two Integers
Copyright © 2017 Powered by LZH, Theme used GitHub CSS.