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.
It seems to say your answer is wrong, and shows what answer you gave, which is wrong. What am I missing?
Please use appropriate formatting when posting code. See https://docs.codewars.com/training/troubleshooting/#post-discourse.
If that was actually the case, you would be able to solve the kata ;)
Your solution assumes that the input will always contain at least 1 occurrence of each direction, but this is an incorrect assumption to make. You can print the input yourself to confirm this. See https://docs.codewars.com/training/training-example/#debugging-a-kata.