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.
I think my Internet is 2 weak... i got 'timed out'... However, i tested it for individual examples and... it worked.
assuming it's the same as in java you have to give the perimeter of n+1 squares. As such n==1 and n==2 won't have the same result.Furthermore you should reread the problem as you are also returning the wrong values for these cases...
This comment is hidden because it contains spoiler information about the solution