← OYO questions

Clone a linked list with next and random pointers in O(1) space

Filed under OYO · Also reported at Livspace

Clone a linked list where each node contains a 'next' pointer and a 'random' pointer that may point to any node in the list or null, using O(1) extra space.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related OYO questions

Collected from public candidate posts and coding forums. Updated Nov 2026.