Question: 3. a) Draw the binary max-heap after inserting the following values, one after another. 11, 23, 32, 15, 40, 25, 16, 22, 10 You

3. a) Draw the binary max-heap after inserting the following values, one after another. 11, 23, 32, 15, 40, 25, 16, 22, 10 You must show each step of building the heap and eventually the final tree. Please, put your final tree inside a box so that it can be easily understood among other intermediate trees. b) A 3-ary min heap is like a binary min heap, but instead of 2 children, nodes have 3 children. A 3-ary heap can be represented by an array as shown in Figure 1 (up to level 2). A[1] A[0] A[2] A[3] A[4] A[5] A[6] A[7] A[8] A[9] A[10] A[11] A[12] Figure 1: 3-ary heap representation using an array Write down MIN_HEAPIFY (A,i) function for a 3-ary min-heap that restores the heap property for ith node.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
