I have an assignment asking me to create a binary heap using binary tree instead of array. I have no idea about how to do this as what I got from internet/lecture is implement through ARRAY.

private static class Node { public double value; public Node left, right; public Node(double value, Node left, Node right) { this.value = value; this.left = left; this.right = right; }

Code above is given, and I required to create an insert method. So, can you give me some general idea on how to do this?

thanks