Types of heaps
There are 2 types of heaps:
- Max-Heap
- Min-Heap
1. Max-Heap:
In a Max-Heap, the key at the root node must be the greatest among the keys present at all its children. The same property must be recursively true for all sub-trees in that Binary Tree.
2. Min-Heap:
In a Min-Heap the key at the root node must be minimum among the keys present at all of it’s children. The same property must be recursively true for all sub-trees in that Binary Tree.
Binary Heap Notes for GATE Exam [2024]Time Complexity of building a heap:
In the GATE Exam, understanding binary heaps is like having a secret weapon. Questions might ask you to pick the right tool for a job, and heaps are often the superheroes of quick and efficient data organization.
Table of Content
- Introduction to Heap:
- Types of heaps:
- Representation of Binary Heap:
- Operations on Binary Heaps:
- Advantages of Heap Data Structure:
- Disadvantages of Heap Data Structure:
- Previously Asked GATE Questions on Binary Heap
Contact Us