So my paint skills are not the best but I think it shows the example well. Imagine I want to calculate the shortest path between A and C, considering all the algorithms I've found are greedy, wouldn't it be stuck in an infinite cycle between A and B?
Any sugestions?
Thanks in advance
No, there shouldn't be an infinite cycle.
Visited and unvisited nodes in the graph are kept track of, and a visited node will never be visited again.
In your example: