[Heap] Create a min-binary heap using following numbers (appearing/inserting in the given order):
5, 22, 19, 56, 50, 25, 1, 3, 10, 6, 32, 12, 11
[Hint: you can put the items in sequence in a binary tree and then use the buildHeap() method.]
[Hashing] Consider a hash table where the hash function h is defined as the modulo 10 operation i.e., for any integer k, h(k) = k % 10 (the ‘modulo 10’ operator returns the remainder when k is divided by 10). The following items are inserted in the given order: 10, 19, 12, 17, 8, 22, 13, 7, 15. Indicate (preferably, draw) the hash tables when the numbers are inserted according to (i) quadratic probing, and (ii) separate chaining. All must be done or no credit.
[Heap] Create a min-binary heap using following numbers (appearing/inserting in the given order): 5, 22, 19,...
Tree & Hash Table & Heap Use the following integer keys 73, 58, 91, 42, 60, 130, 64, 87 to perform the followings: a) Binary Search Tree - Draw a binary search tree - Retrieve the integers keys in post-order - Retrieve the integers keys in pre-order - Draw a binary search tree after node 58 is deleted b) Create a Hash Table using the methods described below. Show the final array after all integer keys are inserted. Assumes that...
Tree & Hash Table & Heap Use the following integer keys 73, 58, 91, 42, 60, 130, 64, 87 to perform the followings: a) Binary Search Tree - Draw a binary search tree - Retrieve the integers keys in post-order - Retrieve the integers keys in pre-order - Draw a binary search tree after node 58 is deleted b) Create a Hash Table using the methods described below. Show the final array after all integer keys are inserted. Assumes that...
Please select file(s) Select file(s) Q9 Double 15 Points Consider inserting the keys 10, 22, 31, 4, 15, 28, 17, 88, 59 into a hash table of length m 11 using open addressing with the auxiliary hash function l'(k) = k. Illustrate the result of inserting these keys using linear probing, using quadratic probing with c1 3, and using double hashing with h1(k) = k and h2(k) = 1 + (k mod (m – 1)). See Cormen p.272 1 and...
C++ Question 9 5 pts Deleting the minimum element in a min-heap of N elements takes in average case O(N log N) O(1) O(N) Oſlog N) D Question 10 5 pts The time taken to find an element in an AVL tree of depth d is Old) 02) Oſlog d) Old log d) Question 11 5 pts Secondary clustering in a hash table occurs when using Linear probing Separate chaining Quadratic probing Double hashing Question 12 5 pts When sorting...
5. Hashing (a) Consider a hash table with separate chaining of size M = 5 and the hash function h(x) = x mod 5. i. (1) Pick 8 random numbers in the range of 10 to 99 and write the numbers in the picked sequence. Marks will only be given for proper random numbers (e.g., 11, 12, 13, 14 ... or 10, 20, 30, 40, .. are not acceptable random sequences). ii. (2) Draw a sketch of the hash table...
10. (5 points) Consider data with integer keys 28, 21, 11, 47, 36, 19, 32 in that order inserted into a hash table of size 7 and hashing function is h(key) = k % 7. Show a chaining hash table after doing the insertions:
2) (5 pts) Consider inserting the following values into a min heap, in this order: 12, 3, 19, 2, 1. Show the final locations for each value in the array storing the heap. (Recall that we store heaps in arrays using 1-based indexing and typically leave the 0 index blank.) Note: Only the answer will be graded for this question. 2 3 4 5 index value
Java quiz need help :Add the following numbers in the order given to a (min) heap using the heap add algorithm (with trickle-up). 23 - 57 - 12 - 85 - 72 - 55 - 8 - 49 - 88 - 62 - 11 - 94 Draw the generated heap (10 points) Then delete three elements from that heap using the heap remove algorithm and draw the resulting heap. (10 points)
c++ *construct (draw) a Max Heap when the following keys are inserted in the given order: 5, 10, 4, 3, 1, 15, 11, 12, 20, 19, 2 *What is the index of the right child of key 20? *Draw the max Heap after performing removeMax()
Suppose the following values are inserted into a binary tree, in the order given: 12, 7, 9, 10, 22, 24, 30, 18, 3, 14, 20 Draw a diagram of the resulting binary tree, How would the values in the tree you sketched for question above be displayed in an in-order, pre-order, and post-order traversals?