how to calculate the shortest path between two nodes in a graph where the source and target are the same?
Graph:
A->B(5)
A->D(5)
A->E(7)
B->C(4)
C->D(8)
C->E(2)
D->C(8)
D->E(6)
E->B(3)
for example what is the shortest path between B and B? I tried to use dijkstra but didn't work, it always return B->B in the first step.
correct ans: B->C->E->B