Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/neetcode-gh/leetcode
/ getSum
Method
getSum
java/0371-sum-of-two-integers.java:3–10 ·
view source on GitHub ↗
(int a, int b)
Source
from the content-addressed store, hash-verified
1
class
Solution {
2
3
public
int
getSum(
int
a,
int
b) {
4
while
(b != 0) {
5
int
tmp = (a & b) << 1;
6
a = (a ^ b);
7
b = tmp;
8
}
9
return
a;
10
}
11
}
Callers
1
countVowelPermutation
Method · 0.95
Calls
no outgoing calls
Tested by
no test coverage detected