Consider the following values: 20, 10, 45, 23, 46, 75, 15. What value will be at the root of the tree created by inserting these values in the order given to build a min heap?
| a. |
10 |
|
| b. |
23 |
|
| c. |
20 |
|
| d. |
75 |
Consider the following tree with root value 20, 20 has a left child of 10 and a right child value 30; 10 has a left child of 5 and a right child of 15; 30 has a left child of 25 and a right child of 40; 5 has a left child of 3 and no right child; Nodes 3, 15, 25 and 40 have no children. What is the ordering for the postorder traversal?
| a. |
20, 10, 30, 5, 15, 25, 40, 3 |
|
| b. |
20, 10, 5, 3, 15, 30, 25, 40 |
|
| c. |
3, 5, 10, 15, 20, 25, 30, 40 |
|
| d. |
None of the above. |
Consider the following values: 20, 10, 45, 23, 46, 75, 15. What value(s) will be at the root of the tree created by inserting these values in the order given to build a 2-3-4 Tree?
| a. |
10 |
|
| b. |
23, 46 |
|
| c. |
15 |
|
| d. |
20, 45 |
What is the number of nodes in a full binary tree of height 6?
| a. |
32 |
|
| b. |
63 |
|
| c. |
127 |
|
| d. |
None of the above. |
Consider the following values: 20, 10, 45, 23, 46, 75, 15. What value will be at...
Draw the tree resulting from inserting the following values into a binary search tree in order without re-balancing: 40, 10, 60, 30, 20, 90, 70, 50 Null pointers can be omitted as long as it is clear whether a single child is a left or right child. THEN For every node in the tree, the values that can be in the subtree rooted at that node are constrained by ancestors to be in some range of integers. The root (the...
Consider the following BST: 50 30 70 20 40 60 80 15 35 65 36 64 66 QUESTION 32 child of node Referring to the tree above, the value 62 would be inserted as the (left or right) left or right: node: QUESTION 33 Referring to the original tree above (the exact tree in the picture), which nodes are the predecessor and successor of 50 if 50 was deleted. predecessor: successor: QUESTION 34 Referring to the original tree above (the...
Be able to give traversals of the entire tree: Pre-Order: 45, 25, 15, 10, 20, 35, 30, 40, 65, 55, 50, 60, 75, 70, 80 (extra 45 removed). In-Order: 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80 Post-Order: 10, 20, 15, 30, 40, 35, 25, 50, 60, 55, 70, 80, 75, 65, 45
2. a) Consider the following AVL Tree. 50 / 25 75 10 Insert the following values in the given AVL Tree, one after another, and show the resulting tree after each insertion. You must justify your answer by explaining the rotation operation you performed during insertion. 17 40 10 90 5 100 b) Delete the root of the resulting tree in Question 2.a. Show the resulting AVL Tree. Justify your answer by showing every step during deletion.
1.) Consider the binary search tree create by inserting the following values in the ordered given to create the binary search tree [20, 15, 45, 13, 25], what is the order that the nodes will be accessed using the inorder traversal. a. 20, 15, 45, 13, 25 b. 13, 15, 25, 45, 20 c. 13, 15, 20, 25, 45 d. None of the above. 2.) What C++ operation is used to de-allocate memory space? a. deallocate b. new c. delete...
QUESTION 9
Consider the following binary search tree:
If the root node, 50, is deleted, which node will become the new
root?
A
15
B
24
C
37
D
62
QUESTION 10
In the following trees EXCEPT______, the left and right subtrees
of any node have heights that differ by at most 1.
A
complete trees
B
perfect full trees
C
balanced binary trees
D
binary search trees
QUESTION 11
A perfect full binary tree whose height is 5 has...
Consider an post-order traversal of the binary search tree created from the following values: 6 75 22 62 2 93 19 16 46 77 82 96 What two values remain to be output after the value 93 has been output?
Question 4. (20 point, 10 points each) Consider the B+ tree index of order d 2 shown below. Assume the left order is for and the right order is for If you can borrow from both siblings, choose the right sibling. Answer these question:s Root 50 73 85 8 18324o 256810*18*27 32 39 73 80* 41 45* 52 58 91 99* a) Show the B+ tree after inserting the data entry with key 7 into the original tree. b) Show...
Question 8
Consider the tree below. What is the value stored in the parent
node of the node containing 30?
Question 8 options:
10
11
14
40
None of the above
Question 9
Consider the tree below. How many descendants does the root
have?
Question 9 options:
0
2
4
8
Question 10
Consider the tree below. What is the depth of the tree?
Question 10 options:
2
3
4
8
9
Question 11
Consider the tree below. How many...
1.(10 pts) Contrast a heap with a binary search tree by inserting the numbers 60, 30, 40, 50, 20, 10 first in a BST and then in a min-heap. Draw the resulting BST on the left and the heap on the right. You may draw any valid BST or Heap that contain the provided values 2. (5 pts) In section 11.1, the book mentions that heaps are **complete** binary trees, what does that mean? Demonstrate by drawing an example of...