Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Can you please create a C++ version of this kata?
Please review: C++ Translation
My solution passes the first 5 tests then fails the 6th. Why? I even accounted for 2 to the 0 power.
def power_of_two(x):
if x == 1:
return True;
if x < 1:
return False;
return(power_of_two(x/2));
Note: This comment editor clears the indentation.