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.
that is clever
I've actually tried to do this, but it made the code slower lol.
I appreciate you guys commenting and calling out the inefficiencies or else us newer guys would never know.
I see voting on this site is an exercise in the blind leading the blind.
no,
You may assume the parameter is positive.
excuse me,should we think about that the number must be positive?
yeah, and just multiply that variable +1 with variable +1 instead of calling pow..
It's seems a general problem on codewars that 'best practise' is interpreted as 'short', regardless of efficiency or readability
you should put sqrt(sq) into a variable else it has to compute the square root 3 times instead of once.