Solutions for Powers of Two
View the challenge

This challenge requires you to determine whether a number is a power of two, or in other words, if you can raise 2 to some power to get a resulting number. We'll solve this a very simple way by looping through the possible powers of two until we reach the given parameter.



You need to be a member to see the rest of this solution and code.