Mental Model
We create a copy of each node and link them so that the new nodes are placed right after the original ones. Then we fix the random pointers of the new nodes by using the original nodes' random pointers.
Analogy: Imagine you have a row of houses (nodes) and each house has a secret friend (random pointer). You build a new house right next to each original house, then you ask each original house to tell its new neighbor who their secret friend is, so the new houses can connect to the right new friends.
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 to fix for clones.
