Copy List with Random Pointer
Medium📝 Description
Create a deep copy of a linked list with random pointers
Input Format
Linked list head node with random pointers
Output Format
Deep copied linked list head node
Constraints
0 ≤ number of nodes ≤ 1000
🔍 Sample Input
[[7,null],[13,0],[11,4],[10,2],[1,0]]
✅ Sample Output
[[7,null],[13,0],[11,4],[10,2],[1,0]]
Code Editor
Please login to run and submit code.
Results
Shortcuts: Ctrl+Enter to submit, Ctrl+Shift+R to run