Skip to content

Commit 5160fc3

Browse files
feat: number of 1bits ํ’€์ด
1 parent 2e02a6f commit 5160fc3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

โ€Žnumber-of-1-bits/grapefruitgreentealoe.jsโ€Ž

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,6 @@ var hammingWeight = function(n) {
4848
/*
4949
์‹œ๊ฐ„๋ณต์žก๋„: O(k) : ์—ฌ๊ธฐ์„œ k๋Š” n์— ํฌํ•จ๋œ 1์˜ ๊ฐœ์ˆ˜
5050
๊ณต๊ฐ„๋ณต์žก๋„: O(1)
51-
*/
51+
*/
52+
53+
//์ด ์™ธ์—๋„ ๋น„ํŠธ์—ฐ์‚ฐ์ž, ๋น„ํŠธ๋งˆ์Šคํ‚น ๋ฐฉ๋ฒ•์œผ๋กœ ์‹œ๊ฐ„๋ณต์žก๋„๋ฅผ O(1), O(logn)์œผ๋กœ ํ’€์ˆ˜์žˆ๋‹ค.

0 commit comments

Comments
ย (0)