For the k largest you evict the smallest, which needs a min heap.
Acceptance criteria
- 1.#out should show min heap.
For the k largest you evict the smallest, which needs a min heap.
const wantLargest = true; document.querySelector('#out').textContent = wantLargest ? "max heap" : "min heap";
Output ready when you are
Press Run to render your code, or Submit to validate your solution.