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 isn't issue with kata and doing so you skip tests, which on codewars is commonly referred as cheating and can get your account banned ;)
LOL you should add this coment to issues.
how i understand ur comment about run time
@jimzz9 It's debatable. It's using sort for no real reason.
It will be faster than max-min if all numbers are already sorted because sort function is implemented with Tim-sort algorithm. Although max and min are implemented in C, so difference is insignificant.
You can certainly make it faster if you manually go through that string looking for max and min instead of splitting it first.
If you really wanna be fast, implement the same thing in C, and write a quick C-extension so you can use it with Python.
@Aleksa your solution is very elegant.
No.
Fair enough :D
But clever !
Care to elaborate?
disgusting !
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution