dailycodebase

2 month data structures and algorithmic scripting challenge starting from 20th December 2018 - Coding is Fun! πŸ’―πŸ’― Do it everyday!! Also, Do give us a ⭐ if you liked the repository

View on GitHub

cover

Day 58 - Binary Heap

Ques) Write a program to implement a binary heap

Binary Heap

A Binary Heap is a Binary Tree with following properties.

  1. It’s a complete tree (All levels are completely filled except possibly the last level and the last level has all keys as left as possible). This property of Binary Heap makes them suitable to be stored in an array.
  2. A Binary Heap is either Min Heap or Max Heap. In a Min Binary Heap, the key at root must be minimum among all keys present in Binary Heap. The same property must be recursively true for all nodes in Binary Tree. Max Binary Heap is similar to MinHeap.

Referance: Geeks4Geeks

Solution

JavaScript Implementation

Solution

// To Be Added