Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please clearly if you solve it by hand. thank you so much (15 points) Consider INCR-BUILD-MAX HEAP(A) INCR-BUILD-MAX-HEAP(A) heap-sizeA= 1 for i = 2 to

image text in transcribed

Please clearly if you solve it by hand. thank you so much

(15 points) Consider INCR-BUILD-MAX HEAP(A) INCR-BUILD-MAX-HEAP(A) heap-sizeA= 1 for i = 2 to length a. Does INCR-BUILD-MAX HEAP(A) build the same heap as BUILD-MAX-HEAP(A)? Either prove that it does or give a counter example. do MAX-HEAP-INSERT(A, AI i]) b. Show that in the worst case INCR-BUILD-MAX-HEAP(A) requires (Ign) time to build an n-element heap c. Explain why, even though BUILD-MAX-HEAP(A) has a O(n) time bound, it doesn't seem like INCR-BUILD-MAX-HEAP(A), which is bounded by (nlgn), should be able to get a (n) bound

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

Modern Database Management

Authors: Jeffrey A. Hoffer Fred R. McFadden

9th Edition

B01JXPZ7AK, 9780805360479

More Books

Students also viewed these Databases questions