Heap is two types
- Max Heap -> It works like that when we get out a value from the array it gives the largest value
- Min Heap -> It works like that when we get out a value from the array it gives the smallest value
It maintains a complete binary tree . Here parent will be always larger than the child . It maintains like a array . It is used as complete binary array .
This doesn't need sorting .
Top comments (0)