`Hey,
Note: Brother in case of any queries, just comment in box I would be very happy to assist all your queries
15)
16)
17)
18)
Note: Brother according to HomeworkLib's policy we are only allowed to answer 4 parts if there are many. So, I request you to post other part as separate posts.
Kindly revert for any queries
Thanks.
Consider the following values for the following questions: 87, 11, 34, 45, 123, 34, 66, 107...
Prob. 3. Given the following data 50 40 23 36 19 20 9 a) Is this a max heap, draw the tree and check if this is a max heap. b) Illustrate how you would add a new data 46 to the existing maxheap. c) From the answer obtained in part b, illustrate how you would delete the data 40 d) Now illustrate heap sort with the existing data after step c. Give steps, and find runtime. Runtime|Explanation of Algorithm...
1. Consider the following unordered list: 20, 35, 25, 10, 40, 50, 45. Perform heap sort to sort this list in nondecreasing (ascending) order. a. Perform the bottom-up method to arrange these values into a max heap. Show the heapify operations on each relevant subtree. (10 points) b. Show the tree representation and the array representation of these numbers after every dequeue operation. Remember that dequeue does not delete a number. Dequeue will instead remove that number from the heap...
Please finish all the questions,Thanks
Following is Appendix
assume the definition of Java class Heap given in the Appendix For this question, a. (2 marks Consider the following heap 30 12 20 19 6 10 18 Given the array representation of a heap discussed in class, what is the array that corre sponds to this heap? b. (5 marks) Successively insert into the heap of part (a.) 22, 35 and 11, in that order. Use the standard heap insertion algorithm....
14 18 11 10 19 16 23 28 15 21 Again, recall that in a Java program, a binary heap is stored as an array with the first element in position [O] unused, in order to simplify the swim() and sink() operations. Let us denote the unused element of the array with the symbol "#". Therefore, the above complete binary tree will be represented by the following array: T[ 0..13 ] = [ #, 5, 6, 7, 14, 18, 11,...
I will rate your answers so please make sure the answers are
accurate. Please answer the following questions with fully
explanations:
1) Of the following, which has the most impact on the efficiency
of searching for an item in a hash table?
a) the number of non-key fields
b) the size of the table
c) the density of the table
d) whether the size of the table is a prime number
e) the difficulty of computing the inverse of the...
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...
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.
please be accurate, make sure that the answer is correct and explain each step. Draw the min-heap that results from the bottom-up heap construction algorithm on the following list of values: 10, 17, 15, 25, 40, 19, 45, 16, 12, 8, 18, 14, 13, 9, 20, 11, 13 Starting from the bottom layer, use the values from left to right as specified above. Show immediate steps and the final tree representing the min-heap. Afterwards perform the operation removeMin 3 times...
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...
Insert the following values in the given order into a Binary Search Tree and use the resulting BST in the next 5 questions. 15 8 3 6 23 9 11 10 20 13 5 9. What is the height of the resulting Binary Search Tree? 10. What is the depth of the node that stores the value 11? 11. Is there a path from the node storing the value 15 to the node storing the value 5? If so, show...