Learn: PriorityQueue for "smallest first"
.NET has PriorityQueue<TElement, TPriority>. Dequeue always returns the item with the lowest priority value.
```csharp
var pq = new PriorityQueue<string, int>();
pq.Enqueue("low", 5); pq.Enqueue("urgent", 1); pq.Enqueue("mid", 3);
Console.WriteLine(pq.Dequeue());
```
It prints urgent. Use it for "top k" problems, merging k sorted lists, and Dijkstra's shortest path.
#tip · TIP-011
.NET has PriorityQueue<TElement, TPriority>. Dequeue always returns the item with the lowest priority value.
```csharp
var pq = new PriorityQueue<string, int>();
pq.Enqueue("low", 5); pq.Enqueue("urgent", 1); pq.Enqueue("mid", 3);
Console.WriteLine(pq.Dequeue());
```
It prints urgent. Use it for "top k" problems, merging k sorted lists, and Dijkstra's shortest path.
#tip · TIP-011