Question: 1. (15 points) Build a (binary) min heap by pushing the following numbers one by one in order: 31,26,14, 27,33, 19. Draw the min heap

 1. (15 points) Build a (binary) min heap by pushing the

1. (15 points) Build a (binary) min heap by pushing the following numbers one by one in order: 31,26,14, 27,33, 19. Draw the min heap (as a binary tree) after pushing each number (no need to draw the intermediate steps of swapping). 2. (15 points) Perform the pop (or sometimes called extractMin) operation on the final resulting min heap in the above. (Show your work, including the intermediate steps of swapping.) 3. (10 points) Given an array A of numbers. Let f(A) be a function that pushes each element of A onto a min heap h, i.e., f(A) executes the following statements sequentially: 1 push (A [1]) 2 push (A [2]) 3 4 push (A[n]) What is the asymptotic upper bound of f(A)? (Show your work.)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!