Threaded Binary Search Tree

This structure is similar to a binary search tree except that if
a node does not have a right or left child, instead it holds a
pointer to the sucessor or predecessor nodes(as according to
in order traversal of the tree)
The difference between child or a successor/predecessor pointer
is highlighted by a couple int values added to the node structure.
Also, this tree has the concept of a head, to which the smallest
and the largest of the tree's nodes will point to. The head's
left child points to the root of the tree.