Traffic Monitoring
Write a function to detect an intersection where two routes converge to analyze traffic flow, congestion, or optimize traffic signal timings.
The function will receive the heads (headA and headB) of two singly linked-lists. Return the intersection value. Otherwise return null.

const trafficMonitor = (headA, headB) => {
// Enter your logic here...
}
Examples:
Input: listA = [1, 2, 3, 4, 5], listB = [1, 3, 4, 5]
Output: 3
Explanation: 3 is the intersected node.
Input: listA = [1, 2, 3, 4, 5], listB = [1]
Output: null
Explanation: There is intersection between the two lists, so return null.