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 2b0a378 commit 1ad29e0Copy full SHA for 1ad29e0
LeetCode/371. Sum of Two Integers.kt
@@ -0,0 +1,5 @@
1
+class Solution {
2
+ fun getSum(a: Int, b: Int): Int =
3
+ if (b == 0) a
4
+ else getSum(a xor b, (a and b) shl 1)
5
+}
0 commit comments