All pastes #9375 Raw Edit

code

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