File tree Expand file tree Collapse file tree 1 file changed +10
-12
lines changed
solution/0200-0299/0216.Combination Sum III Expand file tree Collapse file tree 1 file changed +10
-12
lines changed Original file line number Diff line number Diff line change @@ -676,6 +676,15 @@ function combinationSum3(k: number, n: number): number[][] {
676
676
}
677
677
return ans ;
678
678
}
679
+
680
+ function bitCount(i : number ) {
681
+ i = i - ((i >>> 1 ) & 0x55555555 );
682
+ i = (i & 0x33333333 ) + ((i >>> 2 ) & 0x33333333 );
683
+ i = (i + (i >>> 4 )) & 0x0f0f0f0f ;
684
+ i = i + (i >>> 8 );
685
+ i = i + (i >>> 16 );
686
+ return i & 0x3f ;
687
+ }
679
688
```
680
689
681
690
#### JavaScript
@@ -711,17 +720,6 @@ function bitCount(i) {
711
720
}
712
721
```
713
722
714
- function bitCount(i: number): number {
715
- i = i - ((i >>> 1) & 0x55555555);
716
- i = (i & 0x33333333) + ((i >>> 2) & 0x33333333);
717
- i = (i + (i >>> 4)) & 0x0f0f0f0f;
718
- i = i + (i >>> 8);
719
- i = i + (i >>> 16);
720
- return i & 0x3f;
721
- }
722
-
723
- ````
724
-
725
723
#### C#
726
724
727
725
``` cs
@@ -755,7 +753,7 @@ public class Solution {
755
753
return cnt ;
756
754
}
757
755
}
758
- ````
756
+ ```
759
757
760
758
<!-- tabs: end -->
761
759
You can’t perform that action at this time.
0 commit comments