Clone a Doubly Linked List with Special Pointers

Problem

Given a doubly linked list, each node contains value, left, right, and special:

  • left points to the previous node, and right points to the next node.
  • special may point to ...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: