# Who's Next in the Emergency Room? Heaps

Always call the most urgent patient next while new ones keep arriving, even on a day of 10,000: why an unsorted list and a sorted list both slow down, and the structure that fixes them, the heap, which keeps a tree in a plain array.

![Cheat sheet: Who's Next in the Emergency Room? Heaps](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/93a8def6fcc14658be6f2ecc5e996c39.webp)

- Category: Data Structures
- Level: Journeyman
- Tags: Complete Binary Tree, data structures, heap, Max-Heap, Min-Heap
- Updated: November 3, 2026

Source: https://www.ask-codey.com/cheat-sheets/ds-heaps-cheat-sheet
