Copy Linkedlist With Random Pointers
1. Given a singly linklist with an additional random pointer which could point to any node in the list or NULL.Input Format
2. Return a deep copy of the list.
3. For More Details watch Video.
input is handle for youOutput Format
output is handle for you.Question Video
0 <= N <= 10^6Sample Input
5Sample Output
7 -1
15 0
18 4
10 2
5 0
(7, -1) (15, 7) (18, 5) (10, 18) (5, 7)
-
Asked in Companies
-
Related Topics
Video Solution
Code Solution
{ }
{ }
Run