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.

Example 1:

Note:

  1. You must return the copy of the given head as a reference to the cloned list.

Last updated

Was this helpful?