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.
Could have put everything inside one function, not to pollute (global) scope with variables. Interesting solution though :)
Great solution. I forgot all about that array with pipe regex concept!
Why would you ever use this? It's less readable, slower and takes longer to type than the standard python way
This comment is hidden because it contains spoiler information about the solution
😅
O(n) if pos is bounded or constant (say, you always call it to find the 3rd smallest element of a list, no matter the size of it).
But O(n log(n)) average case, like sorting.