private void toDoubleLL(Node root, NodeRef prev){
        if(root == null){
            return;
        }
        toDoubleLL(root.left,prev);
        if(prev.node != null){
            prev.node.right = root;
            root.left = prev.node;
            prev.node = root;
        }else{
            prev.node = root;
        }
        toDoubleLL(root.right,prev);
    }
http://www.geeksforgeeks.org/convert-given-binary-tree-doubly-linked-list-set-3/
src/com/interview/tree/BinaryTreeToDoubleLinkList.java