← All problems
Copy List with Random Pointer
Deep-copy a list where each node has next and random pointers.
Complexity
Time O(n), Space O(n) map / O(1) interleave
Common pitfalls
- Shallow-copying random targets
- Breaking the original list during split
Your solution
Log in to save your code and track progress.