Interleave copied nodes with original nodes to avoid a hash map.
original.random.next.Each copy sits next to its original, so you can resolve random pointers in O(1) without extra mapping.
Interleave copied nodes with original nodes to avoid a hash map.
original.random.next.Each copy sits next to its original, so you can resolve random pointers in O(1) without extra mapping.