Skip to content

Commit a551700

Browse files
Update count_number_of_one_bits.py
1 parent 98ee074 commit a551700

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

bit_manipulation/count_number_of_one_bits.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ def get_set_bits_count_using_modulo_operator(number: int) -> int:
6363
def get_set_bits_count_using_lookup_table(number: int) -> int:
6464
"""
6565
Count the number of set bits in a 32-bit integer using a precomputed lookup table.
66+
67+
Note: I see similar approach in GeeksforGeeks, but their implementation is little different.
68+
Link to Code: https://www.geeksforgeeks.org/dsa/count-set-bits-integer-using-lookup-table/
69+
6670
>>> get_set_bits_count_using_lookup_table(25)
6771
3
6872
>>> get_set_bits_count_using_lookup_table(37)

0 commit comments

Comments
 (0)