Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(15 points) A max-heap with capacity 20 and size 10 is shown in the following array format. The following three sub-questions all refer to this

image text in transcribedimage text in transcribedimage text in transcribed

(15 points) A max-heap with capacity 20 and size 10 is shown in the following array format. The following three sub-questions all refer to this max-heap (not the heap you obtained after doing some operations). (a) On the answer sheet, show the result after applying heap-extract-max (A) to the maxheap at the start of this question. (b) On the answer sheet, show the result after applying heap-increase-key (A, 10, 49) to the max-heap at the start of this question. (c) On the answer sheet, show the result after applying max-heap-insert (A, 48) to the max-heap at the start of this question. Q1: Read the instructions for question Q1 in the assignment document. For each of the three sub-questions, write your answer to the question in the given space. (a): After the extract-max operation, we have A[1]= A[2]= A[3]= A[5]= A[10]= (b): After the increase-key operation, we have A[1]= A[2]= A.[3]= A[5]= A[10]= After the insertion operation, we have

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts International Edition

Authors: David M. Kroenke

6th Edition International Edition

0133098222, 978-0133098228

More Books

Students also viewed these Databases questions

Question

Define and measure service productivity.

Answered: 1 week ago