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