Medium
Compute a + b without using + or -.
Return the sum of two integers using bit operations instead of the plus or minus operators.
Examples
Input: a = 1, b = 2
Output: 3
Constraints
- Inputs fit in 32-bit signed integer range
Coding Challenge
Compute a + b without using + or -.
Return the sum of two integers using bit operations instead of the plus or minus operators.
Input: a = 1, b = 2
Output: 3
Preparing your coding workspace...