Meet your coaches
Talk through the problem while you code. Guest text is free. Hosted voice is the Own Words Pack.
Copy List with Random Pointer
Copy List with Random Pointer is Clone Graph wearing a linked-list costume: random can point anywhere, so you cannot copy in one naive pass. A map from old node to new node lets you wire next and random after every copy exists. The O(1)-space interleaving trick is the flex once the map version clicks.
Chat with Fin or Coco right now on mobile.
Start talking through the problem here. Switch to desktop when you're ready to code and run tests.
Start coaching sessionMeet your coaches
Talk through the problem while you code. Guest text is free. Hosted voice is the Own Words Pack.
Start a coached rep now. Guest text is free. Sign in if you want this work on another device.
Email me this coached-rep link
Code + tests need a desktop
Chat works on this phone. Email yourself a link when you want the editor and tests.