How to read the tree picture: n +---left_child(n) | +---left_child(left_child(n)) | | | +---right_child(left_child(n)) | +---right_child(n) Original tree: 7 +---6 | +---8 | | +---5 | | | | | +---1 | | | +---9 | +---2 | | | +--- +---10 +---4 | +---3 Array (and length): [10 7 6 10 8 9 4 3 5 1 2 ] After heapify at node with value 9 7 +---6 | +---8 | | +---5 | | | | | +---1 | | | +---2 | +---9 | | | +--- +---10 +---4 | +---3 Array (and length): [10 7 6 10 8 2 4 3 5 1 9 ] After heapify at node with value 8 7 +---6 | +---1 | | +---5 | | | | | +---8 | | | +---2 | +---9 | | | +--- +---10 +---4 | +---3 Array (and length): [10 7 6 10 1 2 4 3 5 8 9 ] After heapify at node with value 10 7 +---6 | +---1 | | +---5 | | | | | +---8 | | | +---2 | +---9 | | | +--- +---3 +---4 | +---10 Array (and length): [10 7 6 3 1 2 4 10 5 8 9 ] After heapify at node with value 6 7 +---1 | +---5 | | +---6 | | | | | +---8 | | | +---2 | +---9 | | | +--- +---3 +---4 | +---10 Array (and length): [10 7 1 3 5 2 4 10 6 8 9 ] After heapify at node with value 7 1 +---2 | +---5 | | +---6 | | | | | +---8 | | | +---7 | +---9 | | | +--- +---3 +---4 | +---10 Array (and length): [10 1 2 3 5 7 4 10 6 8 9 ] After deleteMin removes 1 2 +---5 | +---6 | | +---9 | | | | | +---8 | | | +---7 | +---3 +---4 | +---10 Array (and length): [9 2 5 3 6 7 4 10 9 8 1 ] After deleteMin removes 2 3 +---5 | +---6 | | +---9 | | | | | +--- | +---7 | +---4 +---8 | +---10 Array (and length): [8 3 5 4 6 7 8 10 9 2 1 ] After deleteMin removes 3 4 +---5 | +---6 | | | +---7 | +---8 +---9 | +---10 Array (and length): [7 4 5 8 6 7 9 10 3 2 1 ] After deleteMin removes 4 5 +---6 | +---10 | | | +---7 | +---8 +---9 | +--- Array (and length): [6 5 6 8 10 7 9 4 3 2 1 ] After deleteMin removes 5 6 +---7 | +---10 | | | +---9 | +---8 Array (and length): [5 6 7 8 10 9 5 4 3 2 1 ] After deleteMin removes 6 7 +---9 | +---10 | | | +--- +---8 Array (and length): [4 7 9 8 10 6 5 4 3 2 1 ] After deleteMin removes 7 8 +---9 | +---10 Array (and length): [3 8 9 10 7 6 5 4 3 2 1 ] After deleteMin removes 8 9 +---10 | +--- Array (and length): [2 9 10 8 7 6 5 4 3 2 1 ] After deleteMin removes 9 10 Array (and length): [1 10 9 8 7 6 5 4 3 2 1 ] After deleteMin removes 10 Tree empty Array (and length): [0 10 9 8 7 6 5 4 3 2 1 ]