Description
https://leetcode.com/problems/copy-list-with-random-pointer/description/
Solution
The key point is to mantain a mapping from old node to copied node,
Step1: traverse the list to form the linked list
Step2: traverse the list to complete the random point relationship(using map)
1 | /** |