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.
The random tests are a joke: it reuses the same graph used by the fixed tests for the entire test suite and only chooses random cities between 16 possible cities. This can barely be called random.
It is not explained what the 3rd argument of
findShortestWay
does, and it is always supplied with0
. Is it the author solution's recursion base argument?Dijkstra's algorithm is a duplicate to existing katas.
Since you expect an absolutely exact value, you need to specify the requirements further. For instance, when do you considere that points are "in" or "out" (inclusive/exclusive, I mean). Unless you're not refering to the same method, but then it's even worse... :/
Hi,
Isn't it too close to this one: https://www.codewars.com/kata/57ab4322cf1fa567f8000c4a ?
(as it's a part of it)
The solution setup is
class Node { /*...*/ }
but the tests want aclass Graph
."storage [...] contains [...] edges of this vertex as values of this vertex." I don't understand that.
"Should contain method add()" Why do you require this method when it is not called in the three main tests?
Why do you pass
0
as a third argument tofindShortestWay
?The random tests just call
findShortestWay
twice and compare the results. Better compare with your own model solution.A native speaker should go over the description.
Also: You start with cities and distances, then continue with a generic undirected graph (vertices, edges, weights). You should mention that all weights are non-negative or Dijkstra won't work.