Heaps: the most urgent parcel firstLesson 5 of 11
Why not a sorted list?
Tanvir's sorted queue shifts 7 values for the blood sample. Sorted insert is O(n); the heap's is O(log n).
Locked
Unlock the rest of Algorithms and Data Structures: what everything costs.
- Every lesson, every resource, unlocked instantly.
- Track progress and pick up where you left off.
- Free preview lessons stay readable from the outline.