DEV Community

Mujahida Joynab
Mujahida Joynab

Posted on

What is Heap

Heap is two types

  1. Max Heap -> It works like that when we get out a value from the array it gives the largest value
  2. Min Heap -> It works like that when we get out a value from the array it gives the smallest value

It maintains a complete binary tree . Here parent will be always larger than the child . It maintains like a array . It is used as complete binary array .

This doesn't need sorting .

Top comments (0)