Max Heap Deletion Step By Step

randerson112358
4 min readFeb 25, 2019

How To Delete A Value In A Max Heap ?

In this article I will show you how to delete an element from a Max Heap also known as a Maximum Heap. You will learn what a heap data structure is, and the algorithm to delete an element from a Max Heap. In this article you will also find helpful videos that show and easily explains how to delete an element from a Min Heap. Let’s get started !

A heap data structure in computer science is a special tree that satisfies the heap property, this just means that the parent is less than or equal to the child node for a minimum heap A.K.A min heap, and the parent is greater than or equal to the child node for a maximum heap A.K.A max heap. In this article I will talk specifically about binary heaps, so each node in our tree will have at most two children. Yes there are more than just binary heaps. The binary heap was created by J.W. J. Williams in 1964 for heapsort.

A binary heap is a binary tree with two other constraints

1) Shape Property: A binary heap is a complete binary tree, this means all of the levels of the tree are completely filled except possibly the last level. The nodes are filled from left to right.

--

--