Learn Before
Concept

Heap

A heap is a data structure that represents a complete binary tree where each interior node is either greater than or less than its leaf node depending on the type of heap.

For Min- Heap, the root node key must be less than or equal to all of its children for any given subtree in the heap. For Max- Heap, the root node key must be greater than or equal to all of its children for a given subtree in the heap.

0

1

Updated 2021-05-18

Tags

Python Programming Language

Data Science