Copy List with Random Pointer

  • 0
    newNode.random =;

    When using 3 scans, the second scan copys the random pointers, could someone explain why it is not simply use

    newNode.random = oldNode.random;

    when it needs

    Thank you very much

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.