Sum of Two Integers — Medium Coding Interview Question
Given two integers a and b, return the sum of the two integers without using the operators + and -.
Example
Input: a = 1, b = 2
Output: 3
Constraints
Topics & Companies
Topics: bit-manipulation
Asked by: Meta, Amazon
Optimal Solution Complexity
Time complexity: O(1). Space complexity: O(1).
Practice more