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
Example 3: Travelling Salesman problem Given: n associated cities and distances among them Find: tour of minimum length that visits all of city. Solutions: How several

A graph with n vertices will absolutely have a parallel edge or self loop if the total number of edges is greater than n-1

algorithm to search a node in linked list

In this unit, the following four advanced data structures have been practically emphasized. These may be considered as alternative to a height balanced tree, i.e., AVL tree.

When writing a code for a program that basically answers Relative Velocity questions how do you go at it? How many conditions should you go through?

SPARSE MATRICES Matrices along with good number of zero entries are called sparse matrices. Refer the following matrices of Figure (a)

draw a flowchart which prints all the even numbers between 1-50

Dequeue (a double ended queue) is an abstract data type alike to queue, where insertion and deletion of elements are allowed at both of the ends. Like a linear queue & a circular q

Chaining In this method, instead of hashing function value as location we use it as an index into an array of pointers. Every pointer access a chain that holds the element havi

How to measure the algorithm's efficiency? It is logical to examine the algorithm's efficiency as a function of some parameter n showing the algorithm's input size. Instance