Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

let max heap h be the heap that the root of heap is the maximum value. h is divided into h[a / 2] from the

let max heap h be the heap that the root of heap is the maximum value. h is divided into h[a / 2] from the first half and h[n/2+ 1] until h[n] of the second half, the first half is stored in array A, and the second half is stored in array B
date of listing, each of the following x On the other hand,
circle the correct one:
1 array A is a heap
yes because 1- n/2 is parent of leaf
2. array B is a heap
no because n/2+1 until n is leaf
3. if n data already stored in heap h. An array that is formed by inserting a value larger than all the value in heap at the beginning/head of the heap h is assumed to be new array C .
The array C is a heap (or) not ?
4 if n data already stored in heap h. A new array D that is created by adding a value u to the heap h that is smaller than any of the n data already stored in heap . if u is added to last element in heap , is Array D heap or not?
please explain number 3,4 thanks

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

Advanced Database Systems For Integration Of Media And User Environments 98

Authors: Yahiko Kambayashi, Akifumi Makinouchi, Shunsuke Uemura, Katsumi Tanaka, Yoshifumi Masunaga

1st Edition

9810234368, 978-9810234362

More Books

Students also viewed these Databases questions

Question

2. What are the different types of networks?

Answered: 1 week ago