Ad
  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    The instructions say that the array should only be modified when two neighbors are opposite directions.

    For example, [NORTH, EAST, SOUTH, NORTH, WEST] should reduce like this:
    0. [NORTH, EAST, SOUTH, NORTH, WEST]

    1. [NORTH, EAST, WEST]
    2. [NORTH]

    Result: [NORTH]

    The expected result you copied can't reduce, but if you did it where if any opposite direction is in the array, you would get the actual result provided. I had that problem too, so I think the instructions may just be a little unclear. Then again, I did skim them pretty quickly.

  • Default User Avatar

    There is no error in the tests. Look at the top of the page: 566 guys passed the C++ kata. Sorry!