You are viewing a single comment's thread. Return to all comments →
My solution. Simpler.
int CompareLists(Node *headA, Node* headB) { while(headA!=NULL && headB!=NULL && headA->data==headB->data)headA=headA->next,headB=headB->next; return headA==headB; }
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 →
My solution. Simpler.