What is a heapSolutionAnswer what is a heap Answer 1Heap i
What is a heap?
Solution
Answer :
what is a heap?
Answer :
1.Heap is tree-based data structure it is a special case of binary tree data structure.
2.A Heap is a partially sorted binary tree.
3.It satisfies the following special heap properties.
1.Shape property
2.Heap property
4.If B is a child node of A, then key A>=B .In this the greatest key is always in the root node.
5.In Shape property,Heap data structure all levels of the tree are fully filled.
6.Head Property :All nodes are >= or <= each of its child nodes.
7.Sometimes heap is also called as Max-Heap.
