• Custom User Avatar

    Alr raised above

  • Custom User Avatar

    Read what dulot wrote up there.

  • Custom User Avatar

    Better variable names than f. Otherwise good idea.

  • Custom User Avatar

    @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

  • Custom User Avatar

    Kind of Puzzle Bobble ;)

  • Custom User Avatar

    Think of NORTH, SOUTH, WEST, EAST as chemical products. When NORTH and SOUTH or WEST and EAST are side by side they annihilate each other; they don't if they are separated by another element.

  • Custom User Avatar

    I quote a post by @Unnamed (see below in the Discourses):

    Only adjacent directions should be reduced. It's like considering curvature of the Earth. Or maybe going down a spiral staircase where you end up in a different layer.

    Nobody told you that you are on a "Cartesian Plane".

  • Custom User Avatar

    Hey, CSDUMMI.

    The problem statement only wants you to cancel out opposite directions when they are adjacent in the list. It is true that the path "North East South West" ends up at the beginning, but since the "South" direction is not directly next to the "North" direction, the problem wants you to ignore it. If the path was "North South East West", you could simplify it because the opposite directions are next to each other.

    Hope that helps explain it a little bit better :)

  • Custom User Avatar

    Sorry, but the rules contradict themself.

  • Custom User Avatar

    Don't overthink it, just follow the instructions, even if you don't agree with them.

  • Custom User Avatar

    That makes no sense in any (Euclidian) Coordinate System.

  • Custom User Avatar

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

  • Custom User Avatar

    Could someone please add a sample test in Haskell?
    Or how could I do that?

  • Custom User Avatar

    Don't forget to mention it's in Haskell.

  • Custom User Avatar

    You don't really need the Data.Char imported.

  • Loading more items...