Best and easy solution |beats 100%  user of c++ in time and space complexity
Intuition\n## make b==0 then a^b=a\n\n# Approach\n### The algorithm repeatedly performs bitwise addition until there is no carry left.\n- Step 1: Calculate the 
# Intuition\n## make b==0 then a^b=a\n\n# Approach\n### The algorithm repeatedly performs bitwise addition until there is no carry left.\n- *Step 1:* **Calculate the carry using the AND operation: carry = a & b. This finds all the positions where both a and b have a 1, which means a carry is needed**\n\n- *Step 2:* **Calculate the sum without carry using XOR: a = a ^ b. This step performs the addition of a and b without considering the carry**\n\n- *Step 3:* **Update b to be the carry, shifted left by one position: b = carry << 1. This moves the carry to the correct position for the next addition**\n\n**Repeat the above steps until b becomes zero, which means there are no more carries to process**\n\n# Complexity\n- Time complexity:\n$$O(1)$$\n\n- Space complexity:\n$$O(1)$$ \n\n# Code\n```\nclass Solution {\npublic:\n    int getSum(int a, int b) {\n        while(b!=0){\n            int carry=a&b;\n            a=a^b;\n            b=carry<<=1;\n        }\n        return a;\n    }\n};\n```
['Bit Manipulation', 'C++']