Give an algorithm to perform build heap in linear time

Assignment Help Data Structure & Algorithms
Reference no: EM131667195

Question: The 2-D heap is a data structure that allows each item to have two individual keys. The delete Min operation can be performed with respect to either of these keys. The 2-D heap-order property is that for any node X at even depth, the item stored at X has the smallest key #1 in its subtree, and for any node X at odd depth, the item stored at X has the smallest key #2 in its subtree. Do the following.

a. Draw a possible 2-D heap for the items (1, 10), (2, 9), (3, 8), (4, 7), and (5, 6).

b. Explain how to find the item with minimum key #1.

c. Explain how to find the item with minimum key #2.

d. Give an algorithm to insert a new item in the 2-D heap.

e. Give an algorithm to perform delete Min with respect to either key.

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

Reference no: EM131667195

Questions Cloud

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.
Personal leave for family issues : Focus on changes that will help you get what you want and maintain the best possible relationship with your readers - Personal leave for family issues
Theories and methods of forensics : Apply theories and methods of forensics, which includes insight into the role of forensic science, the applications of forensic science

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