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