You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's my understanding that 'power of two' refers to a number that can be expressed in the form 2^n, where n is an integer (such as 2^5 or 32). You may be thinking of a square number, which has the form x^2, where x is an integer (like 3^2 or 9). The difference is that, in the former, the base is 2, while in the later, the exponent is 2.
so i tried out the solution to is_power_of_two? with is_power_of_two?(9), it returns false. is this a bug in the code?
The text was updated successfully, but these errors were encountered: