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.
I disagree. An array of the same numbers is sorted, but it is ambiguous what direction it is sorted.
because it's simpler to write/debug (overall) and that won't change a thing about the actual speed (time complexity is the same). Actually, if you time your code, you'll see that this one is way faster (I didn't check, but that's a safe bet) because of python's interpreter (using builtins function is faster, most of the time).
so, less code, more readable, less occasions to do a typo, less to maintain, meaningfull way to handle the problem (="accumulate meaningful data, then use them"). So, definitely the way to go. ;)
cheers