3 ms·
Sorry, I was offline for the break. You have a singly linked list with each node having a "random pointer", an extra field that points to another node in the li
by sershe 6y ago
Sorry, I was offline for the break. You have a singly linked list with each node having a "random pointer", an extra field that points to another node in the list (including itself or null). You need to make a copy of the list, in such manner that random pointers in the copy correspond to the original list, e.g. if the 10th element of the original points to the 3rd element of the original, 10th element of the copy needs to point to the 3rd element of the copy.