Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1.How does a leftist heap guarantee efficient merging? an operation may be slow at times, but on average we have O(log n) merging. since we

1.How does a leftist heap guarantee efficient merging?

an operation may be slow at times, but on average we have O(log n) merging.

since we merge right (following the shortest chain) we cant do more than log n operations

the answer is not mentioned

merging will never take less than log n time (so we have a tight bound)

we save in pointer space

2.How does one delete the largest value from a leftist min heap?

Replace the root with its inorder sucessor

We don't. Only delete min is allowed.

Replace the root with the smaller of its two children

3. Merge the two skew heaps below.

image text in transcribed

Which are the children of 11? List left child first.

32 33

33 32

32 16

wrong

The answer is not mentioned

16 32

4.Merge the (same) two skew heaps shown below.

image text in transcribed

Which are the children of 10? List left child first.

The answer is not mentioned

28 27

22 28

27 28

32 33

5.What is the principle behind skew heaps?

An operation may be slow at times, but on average we have O(log n) merging.

we save in pointer space

The answer is not mentioned

since we merge right (following the shortest chain) we cant do more than log n operations

merging will never take less than log n time (so we have a tight bound)

12 10 16 32 (41 27 28 50 12 10 16 32 (41 27 28 50

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

Transactions On Large Scale Data And Knowledge Centered Systems X Special Issue On Database And Expert Systems Applications Lncs 8220

Authors: Abdelkader Hameurlain ,Josef Kung ,Roland Wagner ,Stephen W. Liddle ,Klaus-Dieter Schewe ,Xiaofang Zhou

2013th Edition

3642412203, 978-3642412202

More Books

Students also viewed these Databases questions

Question

What value of a will make tho following function continuous?

Answered: 1 week ago

Question

c. What groups were least represented? Why do you think this is so?

Answered: 1 week ago