C/C++ Solution 100% faster
Fast and Simple Solution in C/C++\n---\nc\nint getSum(int a, int b){\n    int sum;\n    \n    while (b) // while carry over value is not 0\n    {\n        sum =
## Fast and Simple Solution in C/C++\n---\n```c\nint getSum(int a, int b){\n    int sum;\n    \n    while (b) // while carry over value is not 0\n    {\n        sum = a ^ b; // Get sum without think about carry over\n        b = (unsigned)(a&b)<<1; // Compute new carry over value to be sum in next loop\n        a = sum; // Update sum to \'a\' for next addition \n    }\n    return a;\n}\n```\nBrief idea is about `(((a^b) ^ C1) ^ C2) ^ C3, ...., Cn` which `Cn == 0`. \n`C1, C2, C3, ... Cn` are carry over values calculated from `AccumulatedSumFromXOR & PreviousCarryOverVal << 1`.\n\n---\n
[]