Ad
  • Custom User Avatar

    done by OP

  • Custom User Avatar

    Approved

  • Custom User Avatar

    python new test framework is required. updated in this fork

  • Custom User Avatar

    Python:
    The example tests and test suite aren't using the test framework, missing the imports (user's solution + framework).

  • Custom User Avatar

    C#: method name should be PascalCase (Please refer to implementation of backward compatibility here )

  • Default User Avatar

    Awesome kata actually,
    was amazed by the solution page,
    Nice simple beauiful solutions, mine was rather complicated!! :-(
    Thanks Nancy27

  • Custom User Avatar

    Java requires an array with an empty string, other translations an empty array. This should be fixed.

  • Custom User Avatar

    "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.

  • Custom User Avatar

    Fixed.

    I also prevented input modification changing the test results and made the random tests into a loop (the author wrote really crappy Python code there).

  • Custom User Avatar

    Python test results seem reversed. ['S'] should equal [] should equal [] should equal ['S']...

  • Default User Avatar

    sorry the issue is when I run this code in my com it's give the right output
    but here it gave me wrong output
    and every time I try it gives another output
    the wrong output exactly in the sorting of the list

  • Custom User Avatar

    That's a question, not an issue.

    Don't mutate the input object. If you must, copy it first.

  • Default User Avatar

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

  • Default User Avatar

    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:
    goal=["N","W","S","E"]
    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
  • Default User Avatar

    Damn me!! Not corrected. Reopening, so... :/

  • Loading more items...