Page 1 of 1

23, 7, 92, 6, 12 Imagine that the above numbers are going to be inserted into a min-heap, one by one, in the order they

Posted: Fri May 20, 2022 1:43 pm
by answerhappygod
23, 7, 92, 6, 12
Imagine that the above numbers are going to be inserted into a
min-heap, one by one, in the order they appear from left to right.
What would the array that represents the min-heap look like after
all the numbers have been inserted.
0) What is the value that goes in index 0?
1) What is the value that goes in index 1?
2) What is the value that goes in index 2?
3) What is the value that goes in index 3?
4) What is the value that goes in index 4?
5) Let's say that we delete two items from the heap. What is the
2nd number that will be deleted from the heap
Place the question number before each of your responses.
23 7 92 6 12 Imagine That The Above Numbers Are Going To Be Inserted Into A Min Heap One By One In The Order They 1
23 7 92 6 12 Imagine That The Above Numbers Are Going To Be Inserted Into A Min Heap One By One In The Order They 1 (304.92 KiB) Viewed 31 times
This tree will have to be balanced. Answer all these questions
after the tree has been rebalanced
1) What is the Height of the root after rebalance:
2) What is the Balance Factor of the root after rebalance
:
3) How many rotations did you need to do:
4) What was the 1st rotation that you did? (Left or right)
5) If there was a second rotation, what was the 2nd rotation
that you did?
Identify the number of the question before each of your
responses?
23 7 92 6 12 Imagine That The Above Numbers Are Going To Be Inserted Into A Min Heap One By One In The Order They 2
23 7 92 6 12 Imagine That The Above Numbers Are Going To Be Inserted Into A Min Heap One By One In The Order They 2 (232.27 KiB) Viewed 31 times
1) What is the infix notation of the above tree. Make sure to
include the parentheses?
2) What is the postfix notation of the above tree
3) What is the result of the evaluation of the expression
50 30 80 (25 40 55 48

+ + 3 4 3 4 4 7 * 3 4