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
Tests in Ruby translation do not supply an expected value when failed.
Try it with a single for loop. Right now, you're looping through each character in
input
twice, effectively making the function take n^2 steps to resolve, wheren
is the length of input. e.g. If you do this with a string of 10,000 letters, it will take 100,000,000 steps to resolve.updated
Hello! Can someone approve my Ruby translation or give advice on what needs changing? I think my tests might be a bit too lenient, but I'm not certain.
Alright, thanks much clearer!
Please explain [NORTH SOUTH SOUTH EAST WEST NORTH] => [] but [NORTH WEST SOUTH EAST] => [NORTH WEST SOUTH EAST]
Ruby tests are broken
Case:
Expected: ["NORTH", "WEST", "SOUTH", "EAST"], instead got: []
Since N > W > S > E essentially take you in a circle if you travel the same distance each way, you'd end up at the exact same location.
Impossible to complete because of the combination of 'big tests' and subsequent multitude of 50001 item performance tests that take more than the 12 seconds allowed by the site for the tests to pass.