public Node multiply(Node head1, Node head2){
        LinkList ll = new LinkList();
        head1 = ll.reverse(head1);
        head2 = ll.reverse(head2);
        DoubleLinkList dll = new DoubleLinkList();
        Node result = null;
        Node resultStart = null;
        Node currentResult = null;
        Node currentTail = null;
        
        while(head2 != null){
            Node current = head1;
            int carry = 0;
            while(current != null){
                int r = current.data * head2.data;
                r += carry;
                carry = r/10;
                r = r%10;
                if(currentResult == null){
                    currentResult = dll.addAtFront(currentResult, r);
                    currentTail = currentResult;
                }else{
                    currentResult = dll.addAtFront(currentResult, r);
                }
                current = current.next;
            }
            if(carry != 0){
                currentResult = dll.addAtFront(currentResult, carry);
            }
            currentResult = null;
            if(result == null){
                result = add(resultStart,currentTail);
                resultStart = result;
            }else{
                result = add(resultStart,currentTail);
                resultStart = resultStart.before;
            }
            head2 = head2.next;
        }
        while(result.before != null){
            result = result.before;
        }
        head1 = ll.reverse(head1);
        head2 = ll.reverse(head2);
        return result;
    }
Multiply two numbers in form of link list
Idea is to multiply one number from head2 with all numbers from head1.
This result is stored in currentResult. Pass this currentResult and any previous result from multiplication
and add them
src/com/interview/linklist/MultiplyTwoNumbersLinkList.java