Medium

Min Heap

A min heap is a complete binary tree stored in an array. Every parent is less than or equal to its children, so the minimum sits at the root.

Costs

CategoryData Structure
DifficultyMedium
Peek minimumO(1)
InsertO(log n)
Extract minimumO(log n)

Questions

What is Min Heap?

A min heap is a complete binary tree stored in an array. Every parent is less than or equal to its children, so the minimum sits at the root.

Where do I practice it?

DSA Master keeps challenges and progress on the phone. This page is the idea and the costs.