Skip to content

120415/Heap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Heap

Learning heap data structure

This project show-case running example for both Min and Max heap. It is designed to work for all kinds of number like Integer, Long, BigDecimal, etc

There is two API exposed to operate on the binary tree.

  1. Push - Used to add the element in the tree.
  2. Pop - Used to delete the element in the tree.

Min Heap

  1. As part of insertion, Data would be sorted in ascending order
  2. When you try to pop the element, You will be get minimum element

Max Heap

  1. As part of insertion, Data would be sorted in descending order
  2. When you try to pop the element, You will be get maximum element