Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
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.
Let me know what is confusing?
And this Kata won't be posted if the test cases are failing.
like @SimonR mentioned, the second test case is confusing and failing in Objective C
maybe you can create a new one :) and not under rate the kata for your own reasons.
Numbers -> Names
Sort the names of the numbers
So
[1,2,3]
->[1,3,2]
I already emphasized that it is only set as an Example since decalration of
Array
inJava
differs from other Languages.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"}}));
The ORDER of the Place(s) where route was taken.
As set in the EXAMPLE
the given
array
ofroutes
were as follows:[[USA, BRA], [JPN, PHL], [BRA, UAE], [UAE, JPN]]
The return or
result
should be:"USA, BRA, UAE, JPN, PHL"