Back to course home
0% completed
Vote For New Content
On this page
Two main types of heaps
Storing a Heap in an Array
Array Representation of a Heap
Example: Max Heap as an Array
Example: Min Heap as an Array
- Find Maximum/Minimum in a Heap
- Inserting Elements into a Heap (Heapify Up)
Step-by-step Algorithm for Inserting an Element
Step-by-Step Example (Min Heap Insertion)
Code
Complexity Analysis
- Deleting Elements from a Heap (Heapify Down)
Step-by-step Algorithm for Deleting the Root (Deletion in Min Heap)
Step-by-Step Example (Min Heap Deletion)
Code
Complexity Analysis
- Building a Heap from an Unordered Array
Algorithm for Building a Heap
Code
Complexity Analysis
Heap Implementation in Different Programming Languages