AfterAcademy Tech
•
18 Feb 2020

Heap is a very useful data structure that every programmer should know well. The heap data structure is used in Heap Sort, Priority Queues. The understanding of heaps helps us to know about memory management. In this blog, we will discuss the structure, properties, and array implementation of heaps.
Heap is a complete binary tree with some property. There are two types of a heap on the basis of the property.


Compelete Tree - A tree in which all levels are completely filled except possibly the last level and last level has all keys left as possible.

A binary heap is represented as an array. The representation follows some property.
Since a Binary Heap is a Complete Binary Tree, it can be easily represented as an array and array-based representation is space-efficient.

Level Order Traversal of the heap will give the order in which elements are filled in the array.
Happy coding! Enjoy Algorithms.
AfterAcademy Tech
Data structures are widely used in every aspect of computer science. Data structures are the way of organizing and storing data in a computer so that it can be used efficiently. In this blog, we will look into data structures, its types, operations and applications.

AfterAcademy Tech
Heap is a very useful data structure that every programmer should know well. The heap data structure is used in Heap Sort, Priority Queues. The understanding of heaps helps us to know about memory management. In this blog, we will discuss the various about Heap Building and Heap Sort.

AfterAcademy Tech
Given array representation of min Heap, write a program to convert it to max Heap. This problem will clear the concepts of the heap and priority queue which is a very important concept of data structures.

AfterAcademy Tech
Tree is a widely-used powerful data structure that is a viable addition to a programmer’s toolkit. We shall be discussing the types and properties of trees in this blog.
