Creation of Heap, Data Structure & Algorithms

Q. Create a heap with the given list of keys:

8, 20, 9, 4, 15, 10, 7, 22, 3, 12                                                 

Ans:

Creation of the heap:- 8 20   9  4      15   10   7     22   3     12

1200_Creation of heap.png

 

Posted Date: 7/10/2012 5:44:41 AM | Location : United States







Related Discussions:- Creation of Heap, Assignment Help, Ask Question on Creation of Heap, Get Answer, Expert's Help, Creation of Heap Discussions

Write discussion on Creation of Heap
Your posts are moderated
Related Questions
Breadth-first search starts at a given vertex h, which is at level 0. In the first stage, we go to all the vertices that are at the distance of one edge away. When we go there, we

what is frequency count with examble? examble?

Write a detailed description of a function that takes in an integer as an argument, then prints out the squares of all positive integers whose squares are less than the input. (The

Define Merge Sort  Merge sort is a perfect example of a successful application of the divide and conquer method. It sorts a given array A[0...n-l] by separating it into two ha

A binary tree in which if all its levels except possibly the last, have the maximum number of nodes and all the nodes at the last level appear as far left as possible, is called as


A stack is a last in, first out (LIFO) abstract data type and sequential data structure. A stack may have any abstract data type as a component, but is characterized by two fundame

Illustrates the program for Binary Search. Program: Binary Search /*Header Files*/ #include #include /*Functions*/ void binary_search(int array[ ], int value,

Define Prim's Algorithm Prim's  algorithm  is  a  greedy  algorithm  for  constructing  a  minimum  spanning  tree  of  a  weighted linked graph. It works by attaching to a bef

D elete a specific Node from Double Linked List as follows DELETEDBL(INFO, FORW, BACK, START, AVAIL,LOC) 1. [Delete Node] Set FORW [ BACK [LOC]]:= FORW[LOC]& BACK [FORW[