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 comment is hidden because it contains spoiler information about the solution
It is really laconic, but it introduces additional temp list which makes it slower than other solutions. Moreover it uses pop to get data from args: it is also slower than just iterating values, but moreover it modifies args. This is not a problem for test, but in real project it might be a problem. So "Clever", but not "Best Practives".
The best solution i've ever seen in my life
PEP 8, LOL, Didn't hear about it)
Fun kata, trickier than first expected.
My mistake, sorry, bro. Great kata...
There're 2
-9
in the input. Your solution is wrong.Random tests for Python are broken:
Testing for [1, -8, 8, 1, 7, 6, 7, 2, 2, 2, -8, -3, -8, -2, -6, -5, -9, 2, -8, 4, 1, -8, -9, 3, -5, -4, -8, -6, -3, 9, -1, -4] and 4
It should work for random inputs too: [-8, -8, -8, -9] should equal [-8, -8, -9, -9]
same
LOL. I never would have thought that it would pass all tests in the prescribed time)
One of the most beautiful and laconic solutions, I'm even surprised that there aren't many "Clever" and "Best Practices" marks. It deserves much more.
Nice one