Ezvor

3778. Minimum Distance Excluding One Maximum Weighted Edge

Medium Preparing judge… LeetCode

Hints

Hint 1
Use Dijkstra
Hint 2
The problem is the same as finding the minimum path from 0 to n - 1 with one edge excluded
Hint 3
Use states (dist, node, excluded) as your Dijkstra elements