i have greedy and dijkstra algorithms with the same distance. My question is which distance to choose, B to C or B to D

45 Views Asked by At

The problem I marked in the picture is choosing the shortest path for the greedy and Dijkstra algorithms, now I'm confused because there are 2 identical paths, namely B to C and B to D. Which path will be chosen because as far as I know the greedy algorithm compares the smallest numbers or solves the problem step by step. Thank you for helping :) enter image description here

I hope paths B to C or B to D can be completed

0

There are 0 best solutions below