mirror of https://github.com/TheAlgorithms/C
Revert "Added Solution to leetcode Problem 191"
This reverts commit 5a6ed8e245
.
To modify code to add comments
0
This commit is contained in:
parent
1f88545538
commit
d2ad4b0109
|
@ -32,7 +32,6 @@ LeetCode
|
|||
|169|[Majority Element](https://leetcode.com/problems/majority-element/) | [C](./src/169.c)|Easy|
|
||||
|173|[Binary Search Tree Iterator](https://leetcode.com/problems/binary-search-tree-iterator/) | [C](./src/173.c)|Medium|
|
||||
|190|[Reverse Bits](https://leetcode.com/problems/reverse-bits/) | [C](./src/190.c)|Easy|
|
||||
|191|[Number of 1 Bits](https://leetcode.com/problems/number-of-1-bits/) | [C](./src/191.c)|Easy|
|
||||
|203|[Remove Linked List Elements](https://leetcode.com/problems/remove-linked-list-elements/) | [C](./src/203.c)|Easy|
|
||||
|206|[Reverse Linked List](https://leetcode.com/problems/reverse-linked-list/) | [C](./src/206.c)|Easy|
|
||||
|215|[Kth Largest Element in an Array](https://leetcode.com/problems/kth-largest-element-in-an-array/) | [C](./src/215.c)|Medium|
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
int hammingWeight(uint32_t n) {
|
||||
int TotalBits = 32;
|
||||
int i, weight = 0;
|
||||
for(i = 0; i < TotalBits; i++) {
|
||||
if((n & (UINT32_C(1) << i)) >> i)
|
||||
weight += 1;
|
||||
}
|
||||
return weight;
|
||||
}
|
Loading…
Reference in New Issue