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.
ez
oh yeah range does do these things don't it
wow
I'd say the two line answer is better practice than the single line version above.
I tried to use intertools in former katas and it seems it's not integred in Codewars and there's no console to install it, heh.
This comment is hidden because it contains spoiler information about the solution
1K IQ play
wow
This comment is hidden because it contains spoiler information about the solution
And also can do height ** 2, pow(height) <--- (for this you need importing pow from math or importing math)
Oh, I totally forgot that range can do this.
I need this one explained to me lol Cause im not getting that at all
I need this one explained to me lol Cause im not getting that at all
It certainly looks elegant and functional, but I dug deeper into how Sequence works and how effective they are for small sets or sequences. As a result, using the measureTimeMillis function, I found that executing generateSequence with subsequent processing takes from 5 to 13 seconds. While if you use "do{}while(...)" or just "while" it takes 0 seconds. From this we can conclude that although Sequence is very concise and saves us from mutability and temporary variables, we still need to be careful when using them for such tasks.
I think this is clever but definitely not best practice.
no way
Loading more items...