We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 17666b7 commit 06eceddCopy full SHA for 06ecedd
number-of-1-bits/ohgyulim.java
@@ -0,0 +1,10 @@
1
+class Solution {
2
+ /* 시간 복잡도: O(1)
3
+ *
4
+ * 공간 복잡도: O(1)
5
+ */
6
+ public int hammingWeight(int n) {
7
+ return Integer.bitCount(n);
8
+ }
9
+}
10
+
0 commit comments