Ad
  • Custom User Avatar

    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.

  • Custom User Avatar

    It is not explained what the 3rd argument of findShortestWay does, and it is always supplied with 0. Is it the author solution's recursion base argument?

  • Custom User Avatar

    Dijkstra's algorithm is a duplicate to existing katas.

  • Custom User Avatar

    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... :/

  • Custom User Avatar

    Hi,

    Isn't it too close to this one: https://www.codewars.com/kata/57ab4322cf1fa567f8000c4a ?
    (as it's a part of it)

  • Custom User Avatar

    The solution setup is class Node { /*...*/ } but the tests want a class 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 to findShortestWay?
    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.