算法挑战7

3 阅读1分钟

重写了一下 138.随机链表的复制

在给map.get(p).next和map.get(p).random赋值时搞错了

后来也没加 | null; 因为最后一个节点的next可能是undefined