Search
⌘K

Leetcode 2045. Second Minimum Time to Reach Destination

Find the second-smallest travel time from node 1 to n in an undirected graph with uniform edge traversal time, where synchronized traffic lights flipping every change minutes can force waits at vertices. The core challenge is to account for periodic waiting and maintain the two distinct earliest arrival times per node (a modified BFS/Dijkstra tracking two best times).


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.