Skip to content

Commit e7b67b0

Browse files
authored
Update count1s.java
1 parent eb39fa7 commit e7b67b0

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

LeetCode/count1s.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//Write a function that takes an unsigned integer and returns the number of '1' bits it has (also known as the Hamming weight).
12
public class Solution {
23
// you need to treat n as an unsigned value
34
public int hammingWeight(int n) {
@@ -15,4 +16,4 @@ public int hammingWeight(int n) {
1516
}
1617
return cnt;
1718
}
18-
}
19+
}

0 commit comments

Comments
 (0)