BST Node & Datastructure
by Isai Damier, Android Engineer @ Google

/***************************************************************************
 *
 * Author: Isai Damier
 * Title: BST Node
 * Project: geekviewpoint
 * Package: datastructure
 *
 * Description: A Binary Search Tree (BST) is a very simplified, well
 *    ordered graph. Now, all trees are simplified graphs. What makes
 *    the BST special is the degree to which it reduces the time
 *    complexity of fundamental operations like insert/add, delete/
 *    remove and search/find. With a BST, all these operations can
 *    be performed in O(log(n)) time. The basis for the speed of the
 *    BST is that for each node, the data in the left child is less
 *    and the data in the right child is greater than the data in
 *    said node.
 *
 *    Here the nodes are given integer data instead of generics so to keep
 *    the logic of functions pertaining to the BST easy to follow.
 **************************************************************************/ 
 public class BST {

  private Node root;

  public BST() {
    root = null;
  }

  public Node getRoot() {
    return root;
  }

  //other methods would follow
  
}

class Node {

  int data;
  Node left, right;

  public Node(int el) {
    data = el;
    left = right = null;
  }
}