Mental Model
We create a new linked list that exactly copies the original list's nodes and their random connections without mixing the two lists.
Analogy: Imagine making a perfect twin of a group of friends standing in a line, where each friend also points randomly to another friend. You first stand each twin right next to their original, then connect their random fingers, and finally separate the twins into their own line.
Original list: 1 -> 2 -> 3 -> null Random pointers: 1.random -> 3 2.random -> 1 3.random -> 2 After inserting clones: 1 -> 1' -> 2 -> 2' -> 3 -> 3' -> null Random pointers not set yet Final cloned list: 1' -> 2' -> 3' -> null Random pointers: 1'.random -> 3' 2'.random -> 1' 3'.random -> 2'
