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 comment is hidden because it contains spoiler information about the solution
Sad that this is still lingering in beta. This is an awesome kata! You have to be willing to do the research into the solution. If you can't figure it out on your own -- I couldn't! -- go looking for the "Futurama Theorem." I found a PDF from a teacher who demonstrated the solution by using their students in a live demo. Then I just turned the teacher's live demo into code. I won't say any more, or I'll be flamed for saying too much.
Some dissatisfied with the task, because in the tests there is a performance test for 7 kyu kata, with a very large number of items. Unlike the actual implementation of the algorithm, which is described in detail, you need to do the math. It takes away the ability to implement The algorithm.
And now I've solved it, but only after researching the episode and the theorem. Great kata!
Made some basic edits to spelling (e.g., auxiliar --> auxiliary), punctuation and the like, while trying not to be too pedantic. Looking forward to trying this!
Tests should fail without raising exceptions when the result is not iterable.
Yes but it is because the test suite is more robust now
Random tests still take 6 seconds to generate.
See the bodies "Professor" and "Leela" only swith once (the last element). The restriction is about the bodies!, two pair of bodies are not allow to use the machine. The thing that says "map_" is just the final state of which body has which mind, so Leela is in Professor's body, Bender is in Amy's body, Amy is in Leela's body and Professor is in Bender's body.
This comment is hidden because it contains spoiler information about the solution
I generate more efficiently the tests (The initial test suite takes now at most 3 sec to run all)
This comment is hidden because it contains spoiler information about the solution
Random tests are taking 4-12+ seconds just to generate the random inputs. The mechanism needs to be revised.
(Everything is
O(n)
anyway so there are no reasons to haveO(n^2)
parts around)Shouldn't the example:
Be invalid because the Professor and Leela switch twice?
very cool idea, btw
Reading the discussion below, I think the description should use "index" instead of "element", because the whole "indistinguishable" only makes sense when you completely ignore the actual elements in the array.
Loading more items...