Dijkstra (Weighted) pattern
Relaxing an edge means checking whether reaching its endpoint through the current node creates a cheaper route.
Difficulty: Medium · Approach: Visible frontier and visited order
This is a public lesson preview. Sign in with a Lifetime Pass to open the protected animation, solution, and code.