← Back to companies
[ OK ] Loaded —
[ INFO ]
$ cd
$ ls -lt
01
02
03
04
05
$ ls -lt
01
02
03
04
05
user@intervues:~/$
Given the heads of two singly linked lists headA and headB, return the node at which the two lists intersect. If the two lists have no intersection, return null.
The test input is provided as [listA, listB, skipA, skipB] where skipA and skipB indicate how many nodes to skip in each list before the intersection begins. The test harness constructs two lists that physically share their tail from that point onward. Use reference identity, not value equality, to identify the intersection.