Write a program to find whether a number is a power of two (interviewer wanted a complement-based bit trick).
Asked in the Technical Round 2 stage. Implement is_power_of_two(n), which accepts an integer and returns True if n is a positive power of two, otherwise False. Use constant extra space and demonstrate the bitwise approach.
def is_power_of_two(n):