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.
Most likely because whoever wrote this didn't realize it can be solved in O(1). Or because this kata is listed in the section "LINQ excercises" so the author tried to solve it using System.Linq library. I don't think it can be solved in O(1) using language integrated query.
Then I see others' solution and realize just how bad my method is, and I forgot to remove that "just in case" floor replacement, too.
No need to convert to array.
Why use O(N) approach when it's a O(1) problem?
Or it was your code. Most probably that... Closing.
This happen on 9nd test
Traceback:
in
File "/usr/lib/python3.6/random.py", line 274, in shuffle
x[i], x[j] = x[j], x[i]
KeyError: 0
And after i put a print on the beginning of my code nothing appear so the test case maybe broke.
holy crap dude