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.
@MattZ306 you said that "you could simplify it because the opposite directions are next to each other" but the example given in the instructions is contradicting you
For the path ["NORTH", "SOUTH", "SOUTH", "EAST", "WEST", "NORTH", "WEST"] in the example inside the instructions the solution is said to be ["WEST"]
But if you can simplify only if opposite directions are next to each other the solution should be ["SOUTH", "NORTH", "WEST"] because the second SOUTH is not closer to the second NORTH
There are problems on the solution paths.
If the original path is [NORTH, WEST, SOUTH, EAST] the right minimal path is an empty array and not the array [NORTH, WEST, SOUTH, EAST]
And if the original path is [SOUTH NORTH NORTH SOUTH EAST SOUTH WEST EAST SOUTH WEST] the minimal path is [SOUTH SOUTH] but I receive the error array lengths differed, expected.length=2 actual.length=4
Additional it is a not sense that the solution [NORTH, EAST] can be valid, but the solution [EAST, NORTH] is not equivalent and so not valid