← Samsung questions
CodingReported in a candidate post, Sep 2020

Duplicate a Doubly Linked List with arbitrary pointer

Filed under Samsung

Given a doubly linked list where each node contains a next pointer and an arbitrary random pointer that can point to any node or null, construct a deep copy of the list in O(n) time.

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 Samsung questions

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