Polish the chapter of array and linkedlist

This commit is contained in:
krahets
2023-08-17 05:13:19 +08:00
parent 0858ab91c0
commit c310edb672
26 changed files with 287 additions and 236 deletions

View File

@@ -7,8 +7,8 @@
/* 双向链表节点 */
class ListNode {
var val: Int // 节点值
var next: ListNode? // 后继节点引用(指针)
weak var prev: ListNode? // 前驱节点引用(指针)
var next: ListNode? // 后继节点引用
weak var prev: ListNode? // 前驱节点引用
init(val: Int) {
self.val = val