Available question text
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.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 3244. Shortest Distance After Road Addition Queries II
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source