And? What's the problem? Presumably you're traversing both arrays to compare them and stopping when they're obviously different or at the end:
while ( a != NULL && b != NULL
&& a->data == b->data )
{
a = a->next;
b = b->next;
}
if ( a == NULL && b == NULL )
/* They're equal */
else if ( a == NULL )
/* a is smaller */
else if ( b == NULL )
/* b is smaller */
else if ( a->data < b->data )
/* a is smaller */
else if ( b->data < a->data )
/* b is smaller */
Narue
Bad Cop
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401