Given two integers, a and b, return their sum without using the addition or subtraction operators.
a
b
Constraints:
Let’s take a moment to make sure you’ve correctly understood the problem. The quiz below helps you check if you’re solving the correct problem:
Sum of Two Integers
What is the correct output if the following values are given as input?
a = 5
b = 10
15
-5
5
50
Implement your solution in the following coding playground.
The optimal solution to this problem runs in O(1) time and takes O(1) space.