• Custom User Avatar

    Random tests added. Method renamed as well. Also removed the superfluous 'stack' from the solution.

  • Default User Avatar

    Imagine a spiral staircase, where walking [n, w, s, e] will result in going up (or down) the stairs. But walking [n, s, e, w] in that order will result in staying put.
    Anyway, better to follow the problem spec than to complain about it.

  • Custom User Avatar

    probably if you're taking those directions, i guess if you wanna get technical you could think of walking up a slope so you may end up on the same geographical positiom but vertically you're higher than before xD