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.
Random tests very oftenly generates junctions with a route to itself, which should not be valid.
If the price is $0.18 per km, why are we multiplying by 18?
In fact the unit of the cost to be returned has never been specified. Is it in dollars, or cents?
What happens after that? This is not suffucient as a tie-breaker (as two routes with the same cost and length can exist), and the tests only accepts a single correct path.
Hi,
Imo, you should unpublish this kata. Even if you enforce the time complexity, it's still a duplicate of other already approved kata.
Cheers
This isn't a 2 kyu, maybe if we needed to use Dijkstra because of performance but not as it is.
Having the first 2 elements of the sequence is enough to find its formula; can you explain why the input arrays have up to 100 elements in them, and why the input is an array at all?
The user can modify the input.
Such cases are not tested.