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.
This was a genius way to solve this problem. Kudos to you.
Same here. Nice to learn something new everyday:)
That's clever!
I don't know why i didn't think in replace method
This comment is hidden because it contains spoiler information about the solution
It can't. It's a pure C solution, requiring the minimal possible operations to get the expected result, and is optimized to do the mapping after the filtering but before the expansion step. Your solution, on the other hand (idk whether you were referring to it as faster but still), is 10 times slower in the worst case (no spaces), and hundreds of times slower in the best case (only spaces).
It's hard to judge actual speed of python based on theoretical time complexity, it varies a lot depending on user implementation and the internal C implementation of that code. For example, a, b = min(list), max(list) is usually a bit faster than iterating once with a for loop. Your solution is about 4-5x slower, from my tests at least.
This comment is hidden because it contains spoiler information about the solution
A remastered version :D
Totally deserves a clever upvote :D
I just checked and the random lists can contain over 50.000 elements, so you should try another approach which requires less computation.
One of the most enjoyable kata I did lately, nice work.
Simple and great kata, good job.
Such a great kata with many fundamentals, good job.
that
;
is disturbing :DLoading more items...