Skip to content

Problem 3244

Andrew Shepherd edited this page Nov 18, 2024 · 3 revisions

3244. Shortest Distance After Road Addition Queries II

I initially solved this as a Segment Tree problem.

This turned out to be much simpler and faster using a priority queue.

Clone this wiki locally