Max/Min Heap

Heap Data

Tree Panel

Instruction

A heap is a binary tree that satisfies the heap property. Heap can be of two types:

Min Heap: The element of each node is greater than or equal to the element at its parent. The minimum value element is at the root.

Max Heap: The element of each node is less than the element at its parent. The maximum value element is at the root.

Max/Min Heap can let us easily know the biggest/smallest element in an array. We can also use add and delete operation to update a heap.

Instructions
  1. Input data per line in Heap Data (at most 31 data)
  2. Click the Max Heap or Min Heap button to create Heap
  3. Input one data and click the Insert button to insert it from the bottom of Heap
  4. Click the Delete button to delete the root of Heap

Log Panel