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.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.