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.
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?
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
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
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am