Leetcode 371 Solution
This article provides solution to leetcode question 371 (sum-of-two-integers)
Access this page by simply typing in "lcs 371" in your browser address bar if you have bunnylol configured.
Leetcode Question Link
https://leetcode.com/problems/sum-of-two-integers
Solution
class Solution {
public:
int getSum(int a, int b) {
return b == 0 ? a : getSum(a ^ b, (a & b) << 1);
}
};