We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cb63a32 commit 17edbceCopy full SHA for 17edbce
461. Hamming Distance.java
@@ -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