C++ 0ms 2 lines recursive solution
class Solution {\n    public:\n        int getSum(int a, int b) {\n            if (b == 0) return a;\n            return getSum(a ^ b, (a & b) << 1);\n        }
    class Solution {\n    public:\n        int getSum(int a, int b) {\n            if (b == 0) return a;\n            return getSum(a ^ b, (a & b) << 1);\n        }\n    };\n\nXOR operation is the same as bit addition without considering the carry.\n(a & b) << 1 is the carry, only a and b are both 1 will result in a carry of 1.
['C++']