A linked list of length n is given where each node has a next pointer and a random pointer that can point to any node in the list or be null. Construct a deep copy : brand-new nodes whose next / random mirror the originals. The copy must not reference any original node. Node is predefined with val , next , random . Input format The list is given as [[val, randomIndex], …] where randomIndex is the index the random pointer targets (or null ), e.g. [[[7,null],[13,0],[11,4],[10,2],[1,0]]] . The harness builds it, calls your method, and re-serializes the copy in the same form.