⚡ Build the skills to land top-paying quant jobs. Offer ends in 17d 22h 19m 31s17 days 22 hours 19 minutes 31 seconds.
⚡ Build the skills to land top-paying quant jobs. Offer ends in 17d 22h 19m 31s17 days 22 hours 19 minutes 31 seconds.

Sign in to watch this lesson
Algorithms - Graphs II · 4:17
When every edge costs 0 or 1, Dijkstra's heap only ever holds two distinct labels, so two plain vectors replace it and shortest paths take linear time. We solve an arrow-grid puzzle with two conveyor belts, see why marking cells visited on push gives wrong answers, compare the deque form, and extend the idea to weights 0..k with Dial's ring of k + 1 buckets, measured against a heap.