Bit Manipulation - Power of Four
Consider two approaches to check if n is a power of four: (1) iterative division by 4, and (2) bit manipulation with mask 0x55555555. When is the iterative division approach preferable over bit manipulation?
15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions