All pastes #9376 Raw Edit

fixed code

public java v1 · immutable
#9376 ·published 2005-04-12 03:01 UTC
rendered paste body
	public static IntNode common(IntNode head1, IntNode head2)	{		if(head1==null) return head1;		if(head2==null) return head2;		IntNode s = new IntNode();		if(head1.data>head2.data){			common(head1, head2.next);		}else if (head1.data<head2.data){			common(head1.next, head2);		}else{			s = head1;			s.next = common(head1.next, head2.next);		}		return s;	}