copy list with random pointer O(1) memory