Ad
  • Custom User Avatar

    No, and read the notes:

    Not all paths can be made simpler. The path ["NORTH", "WEST", "SOUTH", "EAST"] is not reducible. "NORTH" and "WEST", "WEST" and "SOUTH", "SOUTH" and "EAST" are not directly opposite of each other and can't become such. Hence the result path is itself : ["NORTH", "WEST", "SOUTH", "EAST"].

  • Default User Avatar

    The instructions describe that the paths have the property of commutativity

    Where do you see that? There are no errors in the tests that are the same in all languages (kata passsed by 49 people in Julia out of a total of 66,386).