Intersection of Two Linked Lists
lengthA = Linked List A
lengthB = Linked List B
key point : lengthA + lengthB = lengthB + lengthA
So, Double pointers can be used here.
1 | /** |
lengthA = Linked List A
lengthB = Linked List B
key point : lengthA + lengthB = lengthB + lengthA
So, Double pointers can be used here.
1 | /** |