Bit Manipulation - Power of Four
You need to determine if a given positive integer can be expressed as 4 raised to some integer power (i.e., n = 4^k for k ≥ 0). Which approach guarantees an optimal O(1) time solution without loops or recursion?
15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions