private Node toBalancedBST(NodeRef headRef, int size){
        if(size <= 0){
            return null;
        }
        Node left = toBalancedBST(headRef,size/2);
        Node head = headRef.node;
        headRef.next();
        Node right = toBalancedBST(headRef,size - size/2 -1);
        head.before = left;
        head.next = right;
        return 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