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 didn't understand those explanations
Yeah, people need to learn the difference between unnecessarily complicated code that they think it looks cool and best practices
you actually never really round, only check "if I rounded now, will it be bigger?"
but the continue working with un-rounded values
Great kata, thank you!
Clever solution! Can someone please walk through this code?
Best practice - really?
Wow, what a clever solution!
Can someone explain this solution please?
Sorry if I'm mistaken, but aren't you also mutating the input (signature) in your solution?
Awesome solution! Do you mind breaking it down and walking through it? Would highly appreciate it.
Thank you for the explanation, it was very helpful! I'm about to start watching the youtube video as well!
Thank you for your kind words! I'll give it a shot!
So we recursively walk down the list, whose elements may be a integer or a list (or a list of a list..etc).
If we come across an int, that means we can square it (hence l*l).
If not, that means we have a list on our hands, which we can iterator over, which we do in the
'recursion condition'.
The base condition is what we are recursively 'working towards' by traversing list inside lists until we hit the int 'jackpot'.
A Python Youtuber has an excellent playlist on recursion implemented in Python. Please check it out for further understanding: https://www.youtube.com/playlist?list=PLGKQkV4guDKHyAbnx6w4eSTetVG2vVeDG
This comment is hidden because it contains spoiler information about the solution
Awesome solution! Can you please walk me through it? What does returning l * l in the first condition do exactly?
This comment is hidden because it contains spoiler information about the solution
Loading more items...