Hello Friends, In this blog post I am going to let you know about an interesting topic that is a heap. The term heap can be defined as follows- A heap of size n is a binary tree of n nodes that satisfies the following two constraints:
The binary tree is almost complete which means there is an integer such that every leaf of the tree is at level k or k+1 and if a node has a right descendent at level k+1 then that node also has a left descendent at level k+1.
The keys in the nodes are arranged such that the content of each node is less than or equal to the contents of its father. Which means for each node info[i]<= info[j] where j is the father of node i.
This condition means that the level of the heap is filled left to right and that a node is not placed on a new level until the preceding level is full. All the binary trees of fig 1 are heaps.
In the case of any queries, you can write to us at email@example.com we will get back to you ASAP.
Hope! you would have enjoyed this post about heap.
Please feel free to give your important feedbacks in the comment section below.
Have a great time! Sayonara!
- Addon Domain vs SubDomain In Hindi. Addon domain और subdomain हिंदी में
- Fundamentals Of C In Hindi
- Preprocessor Directives Of C In Hindi.
- History And Introduction of C Language In Hindi. C language हिंदी में
- Determine and explain if the following binary tree is Heap, BST, Height balance tree, Complete binary tree full binary tree?
- B-Tree Example In Data Structure.
- Kruskal Algorithm In Hindi In Data Structure. Kruskal Algorithm हिंदी में.
- Prim’s Algorithm In Hindi In Data Structure. Prim’s Algorithm हिंदी में
- Sorting Algorithm And Their Time Complexity In Data Structure.
- Shell Sort In Data Structure.