371. Sum of Two Integers
Last updated
Was this helpful?
Last updated
Was this helpful?
Calculate the sum of two integersaandb, but you arenot allowedto use the operator+
and-
.
Example 1:
Example 2:
Thoughts: ()
^ tricks: Use ^to remove even exactly same numbers and save the odd, or save the distinct bits and remove the same. Sum of Two Integers Use^and&to add two integers
Code