138.Copy-List-with-Random-Pointer
138. Copy List with Random Pointer
题目地址
题目描述
A linked list is given such that each node contains an additional random pointer which could point to any node in the list or null.
Return a deep copy of the list.代码
Approach #1 Recursive
Approach #2 Iterative with O(N) Space
Last updated