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.
as tests are random it may sometimes time out
Even with everything commented out, I get the following error when I press the Test button.
The explanations I have seen suggest that for short lists sorting and slicing can be faster but sorted() starts to chug on big lists, so min() max() is better practice when you don't know how big the list is going to be.
"Pythonic" does not mean writing things in as few lines as possible. "Pythonic" is about simplicity and ease of readability. The interpreter doesn't care if you wrote this in one line or 5, but the person who comes behind you to maintain your code will. This code gives very little understanding of what the function is actually trying to accomplish. So, if you didn't write it yourself you might be hard pressed to know how to fix it if it broke.
But it already does that.
this timeouted for me