Ad
  • Custom User Avatar
  • Default User Avatar

    for me it fails in Java.
    if I change this: ->
    assertEquals("Halifax, Montreal, Toronto, Chicago, Winnipeg, Seattle",
    routes.findRoutes(new String[][]{{"Chicago", "Winnipeg"}, {"Halifax", "Montreal"}, {"Montreal", "Toronto"}, {"Toronto", "Chicago"}, {"Winnipeg", "Seattle"}}));

    to this: -> assertEquals(Chicago, Winnipeg, Seattle",
    routes.findRoutes(new String[][]{{"Chicago", "Winnipeg"}, {"Halifax", "Montreal"}, {"Montreal", "Toronto"}, {"Toronto", "Chicago"}, {"Winnipeg", "Seattle"}}));
    it works fine but still it is changed back when pressing submit.

  • Default User Avatar

    Let me know what is confusing?
    And this Kata won't be posted if the test cases are failing.

  • Custom User Avatar

    like @SimonR mentioned, the second test case is confusing and failing in Objective C

  • Default User Avatar

    maybe you can create a new one :) and not under rate the kata for your own reasons.

  • Default User Avatar

    Numbers -> Names

    • 1 -> "one"
    • 2 -> "two"
    • 3 -> "three"
    • etc...

    Sort the names of the numbers
    So [1,2,3] -> [1,3,2]

  • Default User Avatar

    I already emphasized that it is only set as an Example since decalration of Array in Java differs from other Languages.

  • Default User Avatar

    What about this example test case for Java? It contradicts your statement...

    assertEquals("Halifax, Montreal, Toronto, Chicago, Winnipeg, Seattle",
    routes.findRoutes(new String[][]{{"Chicago", "Winnipeg"}, {"Halifax", "Montreal"}, {"Montreal", "Toronto"}, {"Toronto", "Chicago"}, {"Winnipeg", "Seattle"}}));

  • Default User Avatar

    The ORDER of the Place(s) where route was taken.

    As set in the EXAMPLE
    the given array of routes were as follows:
    [[USA, BRA], [JPN, PHL], [BRA, UAE], [UAE, JPN]]

    The return or result should be: "USA, BRA, UAE, JPN, PHL"