From d2ad4b0109c02ca61e1f4f918d7ac3d66526b4f2 Mon Sep 17 00:00:00 2001 From: SaurusXI Date: Fri, 4 Oct 2019 16:49:19 +0530 Subject: [PATCH] Revert "Added Solution to leetcode Problem 191" This reverts commit 5a6ed8e245e7544fce060d92919a353393bfd064. To modify code to add comments 0 --- leetcode/README.md | 1 - leetcode/src/191.c | 9 --------- 2 files changed, 10 deletions(-) delete mode 100644 leetcode/src/191.c diff --git a/leetcode/README.md b/leetcode/README.md index 9c97b587..14e088f9 100644 --- a/leetcode/README.md +++ b/leetcode/README.md @@ -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| diff --git a/leetcode/src/191.c b/leetcode/src/191.c deleted file mode 100644 index 47f19247..00000000 --- a/leetcode/src/191.c +++ /dev/null @@ -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; -} \ No newline at end of file