You are viewing a single comment's thread. Return to all comments →
Python super easy
def compare_lists(llist1, llist2): while llist1 and llist2: if llist1.data==llist2.data: llist1,llist2=llist1.next,llist2.next else: return 0 if not llist1 and not llist2: return 1 else: return 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 →
Python super easy