Copy List with Random Pointer at Amazon
Medium62.4% acceptance
This problem has 75.0% frequency at Amazon.
Problem Description
A linked list of length `n` is given such that each node contains an additional random pointer, which could point to any node in the list, or `null`. Construct a [**deep copy**](<https://en.wikipedia.org/wiki/Object_copying#Deep_copy>) of the list. The deep copy should consist of exactly `n` **bran...
Read full problem and hintsTopics
Also asked at 23 companies
More Amazon Questions
Two SumEasyLongest Substring Without Repeating CharactersMediumLRU CacheMediumAdd Two NumbersMediumMerge k Sorted ListsHard
View all Amazon questions