Copy a Linked List with Random Pointers
Company: Apple
Role: Software Engineer
Category: Coding & Algorithms
Difficulty: medium
Interview Round: Onsite
Overview: Create a deep copy of a linked list whose nodes have next and arbitrary random pointers, using constant auxiliary space beyond the new nodes. Preserve all pointer relationships, restore the original list exactly, and handle null, self, forward, and backward random links.
Read the full Apple Software Engineer interview experience this question came from