We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7512978 commit 715a6a5Copy full SHA for 715a6a5
371-Sum-of-Two-Integers.java
@@ -0,0 +1,10 @@
1
+class Solution {
2
+ public int getSum(int a, int b) {
3
+ while (b != 0) {
4
+ int tmp = (a & b) << 1;
5
+ a = (a ^ b);
6
+ b = tmp;
7
+ }
8
+ return a;
9
10
+}
0 commit comments