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

Knowledge Discovery In Databases

Authors: Gregory Piatetsky-Shapiro, William Frawley

1st Edition

0262660709, 978-0262660709

More Books

Students also viewed these Databases questions

Question

What is job enlargement ?

Answered: 1 week ago

Question

what is the most common cause of preterm birth in twin pregnancies?

Answered: 1 week ago

Question

Which diagnostic test is most commonly used to confirm PROM?

Answered: 1 week ago