Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

JAVA The largest key in a heap-ordered binary tree is found at the leftmost leaf

ID: 3844807 • Letter: J

Question

JAVA

The largest key in a heap-ordered binary tree is found at the leftmost leaf.

Question 1 options:

Question 2 (1 point)

"restoring heap order" is known as

Question 2 options:

Reheapifying

Restorifying

Heaponification

Reheapallocation

Question 3 (1 point)

In a max-oriented heap, a key that is swimming will be swapped with its parent whenever the parent is smaller.

Question 3 options:

Question 4 (1 point)

Give the sequence of the 13 keys in the array that results after inserting the sequence of 3 keys

into the following maximum-oriented binary heap of size 10:

Enter you answer as a sequence of numbers separated by a single space. Do not put spaces at the beginning or the end of your answer. Do not include any punctuation!

Question 5 (1 point)

Give the sequence of the 7 keys in the array that results after performing 3 successive delete-the-max operations on the following maximum-oriented binary heap of size 10:

Enter you answer as a sequence of numbers separated by a single space. Do not put spaces at the beginning or the end of your answer. Do not include any punctuation!

Question 6 (1 point)

Give the array that results immediately after completing the first phase of heapsort (heap construction) on the following array of 10 keys:

Your answer should be a heap.

Enter you answer as a sequence of numbers separated by a single space. Do not put spaces at the beginning or the end of your answer. Do not include any punctuation!

Question 7 (1 point)

An array that is sorted in decreasing order a max-oriented heap.

Question 7 options:

True False

Explanation / Answer

1. The largest key in a heap-ordered binary tree is found at the leftmost leaf :

False
Explanation :The largest key in a heap-ordered binary tree is found at the root



2. "restoring heap order" is known as

Reheapifying

Explanation: If the heap property is violated we need to restore the heap by reheapifying.


3. In a max-oriented heap, a key that is swimming will be swapped with its parent whenever the parent is smaller.
True
Explanation: Its max heap parent needs to be larger than the children, so if parent is smaller it will be swapped


4. Give the sequence of the 13 keys in the array that results after inserting the sequence of 3 keys



5. Give the sequence of the 7 keys in the array that results after performing 3 successive delete-the-max operations on the following maximum-oriented binary heap of size 10:

6 4 2 3 0 1 (Answer )

6
. Give the array that results immediately after completing the first phase of heapsort (heap construction) on the following array of 10 keys:

9 8 7 6 4 2 1 3 5 0

7. An array that is sorted in decreasing order a max-oriented heap.


True
Explanation

If we create the heap, It results in max heap because we will make the largest element as root

Reheapifying

Explanation: If the heap property is violated we need to restore the heap by reheapifying.


3. In a max-oriented heap, a key that is swimming will be swapped with its parent whenever the parent is smaller.
True
Explanation: Its max heap parent needs to be larger than the children, so if parent is smaller it will be swapped


4. Give the sequence of the 13 keys in the array that results after inserting the sequence of 3 keys

  1 9 6    12 11 3 8 10 9 2 4 5 7  1 0 6 (Answer)  



5. Give the sequence of the 7 keys in the array that results after performing 3 successive delete-the-max operations on the following maximum-oriented binary heap of size 10:

6 4 2 3 0 1 (Answer )

6
. Give the array that results immediately after completing the first phase of heapsort (heap construction) on the following array of 10 keys:

9 8 7 6 4 2 1 3 5 0

7. An array that is sorted in decreasing order a max-oriented heap.


True
Explanation

If we create the heap, It results in max heap because we will make the largest element as root