Ad
  • Default User Avatar

    Heck, it doesn't even need to be what you would normally consider a pathfinding algorithm. All you're looking for is whether or not there -is- a path.

  • Default User Avatar

    You dont need to Dijkstra's. That algorithm is for finding the shortest paths in weighted graph.

  • Custom User Avatar

    Search for pathfinding algorithm maybe?

  • Custom User Avatar

    or you just correct your code/algo. :p

    I agree that the requirement is worded in a weird way, though everything is fine about the task.

  • Custom User Avatar

    hi,

    That's not an issue, that's a question (issues are for internal problems to the kata or flaws in the logic or the tests, ... Here, you just didn't get what you're asked for).

    Other than that: always provide the language when posting for either an issue or a question.

    For your current problem, don't consider your code but the actual tests (you're trying to patch an implementation that clearly isn't matching the specs of the problem, so you won't get far doing so):

    • [1,'[',']'] same as ['[',']',1] => how could this be anything else than true? there is no nesting, here.
    • [1,[1,1]] not same as [[2,2],2] => ofc it's not the same, since the nesting isn't done at the same index in the original array.