C practice
- 509 - Fibonacci Number array
1 |
|
- 8. String to Integer (atoi) math, string
1 |
|
- 191. Number of 1 Bits bit operation
1
2
3
4
5
6
7
8int hammingWeight(uint32_t n) {
int res = 0;
while (n > 0) {
res += n & 1;
n = n >> 1;
}
return res;
}
C practice
1 | #include <stdio.h> |
1 | #include <stdio.h> |
1 | int hammingWeight(uint32_t n) { |