Question DSA-LL-0069
HardHow do you copy a linked list where each node also has a random pointer, in O(1) extra space?
- A.
It can't be done
- B.
Use recursion only
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Linked Lists question
How do you copy a linked list where each node also has a random pointer, in O(1) extra space?
It can't be done
Use recursion only
Sign up free to see the answer and a step-by-step explanation.
Interleave copies after each original, set the copies' random pointers, then separate the lists
Sort the nodes