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

Step: 3

blur-text-image

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 Driven Web Sites

Authors: Joline Morrison, Mike Morrison

2nd Edition

? 061906448X, 978-0619064488

More Books

Students also viewed these Databases questions

Question

What must a creditor do to become a secured party?

Answered: 1 week ago

Question

When should the last word in a title be capitalized?

Answered: 1 week ago

Question

2. How were various roles filled?

Answered: 1 week ago