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.
Language: C++
Test suit missing the required header
std::list
Go translation
C and NASM translations. Please review.
It would be better to hardcode the correct result in the training test.
Since I see how the validation works, I can abuse it.
For now, simply returning an empty array completes all the tests.
The random tests are only "random" in the aspect of shuffling, but this does not circumvent that a solution would hard-code the answer, since it is always the same answer that has to be provided, independent on how the input was shuffled.
Currently, one can pass all the tests with this code:
Instead, provide a few completely different fixed tests, and design truly random tests: for instance, produce a random subset of a larger set of cities (or just use "A", "B", "C", ...), linking departures and arrivals in a random way: that would prevent submissions like above.
Random tests are not "shuffing the content of the same test case that we need to sort out anyway".
This comment is hidden because it contains spoiler information about the solution