You are viewing a single comment's thread. Return to all comments →
Nice solution, thanks! I used it to create this recursive version in Python3.
def CompareLists(headA, headB): if (headA and headB) and (headA.data == headB.data): return CompareLists(headA.next, headB.next) else: return 1 if headA == headB else 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 →
Nice solution, thanks! I used it to create this recursive version in Python3.