When to use it
Reach for Dijkstra engine when a heaps & priority queues problem matches the cues in this lesson — especially after you’ve ruled out a brute-force nested scan.
Pattern
Dijkstra engine is a reusable approach under Heaps & Priority Queues. Once you recognize the shape of the input and the ask, this pattern gives you a standard plan instead of inventing a new algorithm from scratch.
Reach for Dijkstra engine when a heaps & priority queues problem matches the cues in this lesson — especially after you’ve ruled out a brute-force nested scan.
Reference implementation in C#, Python, Java, JavaScript, and C++.
Interviewers grade pattern recognition. Naming Dijkstra engine early shows you can classify the problem inside Trees & Graphs.
Drill Dijkstra engine with Heaps & Priority Queues problems — filter the bank and solve 2–3 Easy/Medium items while saying the invariant out loud.
Related Heaps & Priority Queues problems — open any one and apply Dijkstra engine.
Merge k Sorted Lists
Heap
Kth Largest Element in an Array
Heap
Sliding Window Maximum
Monotonic Deque
Find Median from Data Stream
Two Heaps
Top K Frequent Elements
Heap
Task Scheduler
Greedy / Heap
Kth Largest Element in a Stream
Heap
Network Delay Time
Dijkstra
Cheapest Flights Within K Stops
Bellman / Dijkstra