mirror of
https://github.com/krahets/hello-algo.git
synced 2025-02-02 22:43:50 +08:00
fix: break reference cycling (#666)
This commit is contained in:
parent
dbe3b4d6ba
commit
a54ec55516
@ -8,7 +8,7 @@
|
||||
class ListNode {
|
||||
var val: Int // 节点值
|
||||
var next: ListNode? // 后继节点引用(指针)
|
||||
var prev: ListNode? // 前驱节点引用(指针)
|
||||
weak var prev: ListNode? // 前驱节点引用(指针)
|
||||
|
||||
init(val: Int) {
|
||||
self.val = val
|
||||
|
Loading…
Reference in New Issue
Block a user