Array contents after delete-min

A binary min-heap is stored in a 0-indexed array, so the children of index ii are at indices 2i+12i+1 and 2i+22i+2. The array currently holds:


2, 6, 4, 11, 8, 5, 9, 13, 12, 10


One delete-min (extract-min) operation is performed using the standard method: remove the root, move the last element into the root position, shrink the array by one, and sift that element down. Enter the value stored at each index of the nine-element array after the operation.

IndexValue
0
1
2
3
4
5
6
7
8

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Heaps Questions: