• "If you get back to beginning, return an empty array." - there is wrong test written in Sample Tests. It assumes that when you go to the beggining, you return not an empty array but an empty string so that the array length is = 1... Please correct that.

  • Closed the previous issue while I shouldn"t have, so here it goes again...:

    Java tests are not consistent with the python version:

    For python:
    test.assert_equals(directions(goal), [])
    For java:
    String[] goal3 = {"N","W","S","E"};
    assertArrayEquals(new String[] {""}, ShortestPath.directions(goal3));

    Python does the right move, here. Should be new String[0] for java.

    And same problem for the inverted test: the input with new String[] {""} is not an empty array so is invalid. Python sends a real empty list [] instead.

    And DM comments:

    Agree. Irrespective of python, it is just not sensible

    • it means all solutions have to code for a special case of 0.
    • if means the size of the array does not always mean the number of steps