When it comes to the heap, some of you may think something about a binary tree structure where the parent node is always larger or smaller than child nodes.

Actually, a heap is represented by an array. It just has a special scheme to manipulate the items to reduce the time complexity.

A heap has its basic operations like add(), delete(), size() etc. In this article, we introduce a new way to understand Heap with its shift up and shift down functions.

#algorithms #data-structures #programming #developer

A Better Way to Understand Heap Data Structure
1.70 GEEK