# Copy List With Random Pointer: Interview Notes

Copy List With Random Pointer shows up often in coding rounds. Here is how I talk through it when the interviewer is watching.

## Key idea

First pass clone each node and park the copy next to the original (or in a hashmap); second pass wire next and random through those copies; third pass split the two lists.

## Steps to say out loud

1. Restate the input and the exact ask, and nail down constraints and overflow.
2. Name the pattern (linked-list rewiring, two pointers, or a monotonic stack) and why a simpler scan fails.
3. Code it, then trace a short example plus one empty or already-solved edge case.

## Complexity

O(n) extra O(1) with the interleave trick.

## Common mistake

Copying next first and then losing the original random targets because you already detached the source list.

## Practice tip

Time yourself: two minutes to explain, ten to code, three to test edges. Disclosure: I work on Linkjob AI. I also keep a practice cheat sheet at linkjob.ai.