Skip to content

Commit 17edbce

Browse files
authored
Create 461. Hamming Distance.java
1 parent cb63a32 commit 17edbce

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

461. Hamming Distance.java

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// https://leetcode.com/problems/hamming-distance
2+
// shortest?
3+
public class Solution {
4+
public int hammingDistance(int x, int y) {
5+
return Integer.bitCount(x ^ y);
6+
}
7+
}

0 commit comments

Comments
 (0)