leetcode.cn/problems/fu-za-lian-biao-de-fu-zhi-lcof/solution/jian-zhi-offer-35-fu-za-lian-biao-de-fu-zhi-ha-xi-/
1 Users
0 Comments
5 Highlights
0 Notes
Tags
Top Highlights
这个 random 指针意味着在复制过程中,除了构建前驱节点和当前节点的引用指向 pre.next ,还要构建前驱节点和其随机节点的引用指向 pre.random
在复制链表的过程中构建新链表各节点的 random 引用指向
构建 原链表节点 和 新链表对应节点 的键值对映射关系
复制链表
构建新链表的引用指向
Glasp is a social web highlighter that people can highlight and organize quotes and thoughts from the web, and access other like-minded people’s learning.