cpp implementation of Copy List With Random Pointer