Intersection of Two Linked Lists

Given two singly linked lists headA and headB, return the node at which the two lists intersect. If the two lists do not intersect, return null.

The lists are represented as arrays. Find the intersection value if it exists, otherwise return -1.

Examples
Input: [[4,1,8,4,5],[5,6,1,8,4,5]]
Output: 4
Hints

Intersection of Two Linked Lists

Given two singly linked lists `headA` and `headB`, return the node at which the two lists intersect. If the two lists do not intersect, return `null`.