Skip to content

Latest commit

 

History

History
22 lines (17 loc) · 441 Bytes

README.md

File metadata and controls

22 lines (17 loc) · 441 Bytes

Java Heap

Overview

This is a implementation of a Heap in Java that uses an ArrayList coupled with recursion.

Why

Give insight to new users of Java who are trying to learn data structures.

Use

First create a heap object:

Heap h = new Heap();

Once the object has been instantiated, you can insert and delete:

h.insert(TreeNode node);
h.delete();
h.printTree();

Deleting simply returns the max node.