Search
⌘K

Leetcode 1928. Minimum Cost to Reach Destination in Time

Find a path from city 0 to city n-1 in an undirected graph where edges have travel times and each node has a passing fee, minimizing the sum of node fees while keeping total travel time ≤ maxTime (return -1 if impossible). This is a constrained shortest-path problem that requires exploring time as an extra state (e.g., DP/Dijkstra over (node, time)).


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.