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.
Not sure why people voted this best practice, but very clever
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Worst practice but clever! :-D
You're welcome :)
Oh, I See! Thanks so much, perfect explanation. :D
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Big brain, but man that's brutal to read. What was the runtime?
This comment is hidden because it contains spoiler information about the solution
2*n == n*2
Yours seems slightly faster indeed, but around 10-20% depending on the size of the list.
And partly because of the extra layer of itemgetter.
For example with the same random tests as the kata and the same list of 1_000_000 tests for each one, I get the following results:
Mercy: 3.399389314651489 seconds
Oleg: 3.032890796661377 seconds
rowcased: 3.238804864883423 seconds
And while obviously not unreadable, your code takes just a little longer to get for a newcomer.
O(2n). Not the best one
O(2n). Not the best one
variable names can be improved a bit. well done.
This comment is hidden because it contains spoiler information about the solution
Loading more items...