private Node merge(Node head1,Node head2){
        if(head1 == null){
            return head2;
        }
        if(head2 == null){
            return head1;
        }
        if(head1.data <= head2.data){
            head1.next = merge(head1.next, head2);
            return head1;
        }else{
            head2.next = merge(head1,head2.next);
            return head2;
        }
    }
http://www.careercup.com/question?id=6241652616200192
Test cases:
0,1 or more nodes in the tree
src/com/interview/tree/BinaryTreeToSortedLinkList.java