Heap:

Heap is a tree based data structure. Complete binary tree is used for creation and implementation of heap.

2. Properties of the Heap

Heap is a complete binary tree.

The root node is located in H[0]

H[(i-1)/2]

Returns the parent node.

H[(2*i)+1]

Returns the left child…

S.A. Gandheesh

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store