Chapter 2 Question 7 Test Case
erikyangs opened this issue · 1 comments
erikyangs commented
Noticed the question didn't have any tests. Hope this helps!
shared = LinkedList()
shared.add_multiple([1,2,3,4])
a = LinkedList([10,11,12,13,14,15])
b = LinkedList([20,21,22])
a.tail.next = shared.head
a.tail = shared.tail
b.tail.next = shared.head
b.tail = shared.tail
# should be 1
print(intersection(a,b))
brycedrennan commented
Thank you @erikyangs. I've integrated your code here: