hmm thats pretty vauge
. Personally when I do anything with binary trees. all the nodes and leafs ARE all nodes. Drawing a little picture often helps with these sorts of things.
The idea is that a node will use references to other nodes that correspond to their children: eg:
class Node{
Node leftChild;
Node rightChild;
}
if the node has no children when its two pointers can point to null;
In general to do what you are doing:
you need the parent node to point to a new node.
and the new node point to the old 'leaf' as a right child.
Hope that helps in general.