Give an algorithm to perform delete min and delete max

Assignment Help Data Structure & Algorithms
Reference no: EM131667197

Question: A min-max heap is a data structure that supports both delete Min and delete Max at logarithmic cost. The structure is identical to the binary heap. The min-max heap-order property is that for any node X at even depth, the key stored at X is the smallest in its subtree, whereas for any node X at odd depth, the key stored at X is the largest in its subtree. The root is at even depth. Do the following.

a. Draw a possible min-max heap for the items 1, 2, 3, 4, 5, 6, 7, 8, 9, and 10. Note that there are many possible heaps.

b. Determine how to find the minimum and maximum elements.

c. Give an algorithm to insert a new node into the min-max heap.

d. Give an algorithm to perform delete Min and delete Max.

e. Give an algorithm to perform build Heap in linear time

Reference no: EM131667197

Questions Cloud

How large the array must be for the worst-case binary tree : A complete binary tree of N elements uses array positions 1 through N. Determine how large the array must be for A binary tree that has two extra levels.
Any liability for the damage to her roommate car : Sue borrowed her roommate's car just to take her mother to the hospital. Explain whether Sue has any liability for the damage to her roommate's car.
Determine the running time of the insertion for a d-heap : A d-heap is an implicit data structure that is like a binary heap, except that nodes have d children. A d-heap is thus shallower than a binary heap.
Healthcare facility providing emergency- pediatric care : You are the director of health information services at a medium-size healthcare facility providing general, emergency, and pediatric care.
Give an algorithm to perform delete min and delete max : Draw a possible min-max heap for the items 1, 2, 3, 4, 5, 6, 7, 8, 9, and 10. Note that there are many possible heaps.
Public policy originates with legislative : Public policy exception to the employment-at-will doctrine provides that employees may not be terminated for reasons contrary to public policy
Give an algorithm to perform build heap in linear time : The 2-D heap is a data structure that allows each item to have two individual keys. The delete Min operation can be performed.
Height of blood spatter : How do you find the height of Blood Spatter at the beginning of its parabolic arc?
Project management approach on hris implementation : Project management is very broad topic with many applications. explain three (3) advantages of using a project management approach on an HRIS implementation.

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Implement an open hash table

In this programming assignment you will implement an open hash table and compare the performance of four hash functions using various prime table sizes.

  Use a search tree to find the solution

Explain how will use a search tree to find the solution.

  How to access virtualised applications through unicore

How to access virtualised applications through UNICORE

  Recursive tree algorithms

Write a recursive function to determine if a binary tree is a binary search tree.

  Determine the mean salary as well as the number of salaries

Determine the mean salary as well as the number of salaries.

  Currency conversion development

Currency Conversion Development

  Cloud computing assignment

WSDL service that receives a request for a stock market quote and returns the quote

  Design a gui and implement tic tac toe game in java

Design a GUI and implement Tic Tac Toe game in java

  Recursive implementation of euclids algorithm

Write a recursive implementation of Euclid's algorithm for finding the greatest common divisor (GCD) of two integers

  Data structures for a single algorithm

Data structures for a single algorithm

  Write the selection sort algorithm

Write the selection sort algorithm

  Design of sample and hold amplifiers for 100 msps by using n

The report is divided into four main parts. The introduction about sample, hold amplifier and design, bootstrap switch design followed by simulation results.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd