Search
⌘K

Leetcode 3243. Shortest Distance After Road Addition Queries I

Given n nodes initially connected by the directed path 0→1→...→n-1, process incremental additions of forward edges (u→v with u<v) and after each addition report the shortest path length from 0 to n-1. The core challenge is maintaining/updating the shortest-path distance in this DAG under up to 500 edge insertions efficiently.


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.