You are viewing a single comment's thread. Return to all comments →
tried to make it shorter
int CompareLists(Node headA, Node headB)
{ if(headA==NULL &&headB==NULL)
return 1; if((headA==NULL||headB==NULL)||(headA->data!=headB->data))
return 0;
return CompareLists(headA->next,headB->next); }
Seems like cookies are disabled on this browser, please enable them to open this website
Compare two linked lists
You are viewing a single comment's thread. Return to all comments →
tried to make it shorter
int CompareLists(Node headA, Node headB)
{ if(headA==NULL &&headB==NULL)
return 1; if((headA==NULL||headB==NULL)||(headA->data!=headB->data))
return 0;
return CompareLists(headA->next,headB->next); }