Glossary: Algorithms Beyond the Basics
Power of two
Also written: powers of two
A number such as 1, 2, 4, 8... that has exactly one 1 bit. For positive n, `n & (n - 1) == 0` is true only for powers of two.
Glossary: Algorithms Beyond the Basics
Also written: powers of two
A number such as 1, 2, 4, 8... that has exactly one 1 bit. For positive n, `n & (n - 1) == 0` is true only for powers of two.