Example 1
- Input
- head = [[7,null],[13,0],[11,4],[10,2],[1,0]]
- Output
- [[7,null],[13,0],[11,4],[10,2],[1,0]]
Label originals O0 through O4 in next order, with values 7,13,11,10,1. Fresh nodes C0 through C4 have next links C0 -> C1 -> C2 -> C3 -> C4 and random targets null,C0,C4,C2,C0. The pair array looks identical, but every node and non-null target belongs exclusively to the new list.