Skip to content

Commit a301155

Browse files
authored
Merge pull request doocs#202 from egnaf/bit-count-java
Add Java Solution for Problem 191
2 parents f67fc91 + 1045be7 commit a301155

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
public class Solution {
2+
public int hammingWeight(int n) {
3+
return Integer.bitCount(n);
4+
}
5+
}

solution/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -658,6 +658,7 @@
658658
│   ├── Solution.js
659659
│   └── Solution.py
660660
├── 0191.Number of 1 Bits
661+
│   ├── Solution.java
661662
│   ├── Solution.js
662663
│   └── Solution.py
663664
├── 0196.Delete Duplicate Emails

0 commit comments

Comments
 (0)