DSA: sorted order, subarray
Intuition
Heaps are incredibly useful for problems that have some kind of sorted property, and a subarray is usually the structure of interest.
Implementation
Visual
DSA: sorted order, subarray
Intuition
Heaps are incredibly useful for problems that have some kind of sorted property, and a subarray is usually the structure of interest.
Implementation
Visual