Leetcode 3244. Shortest Distance After Road Addition Queries II
Given n nodes with baseline directed edges i→i+1, process queries that add forward edges u→v and after each addition return the shortest path length from 0 to n−1. The key challenge is to maintain that shortest-path distance under incremental forward shortcuts—where the added intervals are non‑crossing (no interleaving u1<u2<v1<v2)—so you can exploit the laminar structure for efficient updates.
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.