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)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay