public static void main(String args[]){
        LinkList ll = new LinkList();
        Node head = null;
        head = ll.addNode(1, head);
        head = ll.addNode(2, head);
        head = ll.addNode(3, head);
        head = ll.addNode(4, head);
        head = ll.addNode(5, head);
        head = ll.addNode(6, head);
        head = ll.addNode(7, head);
        SortedLLToBalancedBST sll = new SortedLLToBalancedBST();
        head = sll.toBalancedBST(head);
        sll.printTreeInOrder(head);
        sll.printTreePreOrder(head);
    }
http://www.geeksforgeeks.org/sorted-linked-list-to-balanced-bst/
Test cases
empty list
0 1 or more node lists
src/com/interview/linklist/SortedLLToBalancedBST.java