We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 98ee074 commit a551700Copy full SHA for a551700
bit_manipulation/count_number_of_one_bits.py
@@ -63,6 +63,10 @@ def get_set_bits_count_using_modulo_operator(number: int) -> int:
63
def get_set_bits_count_using_lookup_table(number: int) -> int:
64
"""
65
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
70
>>> get_set_bits_count_using_lookup_table(25)
71
3
72
>>> get_set_bits_count_using_lookup_table(37)
0 commit comments