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