This commit is contained in:
krahets
2023-05-27 17:14:08 +08:00
parent 5338fdd5f1
commit ddf05a5ff8
3 changed files with 3 additions and 3 deletions

View File

@@ -995,7 +995,7 @@ comments: true
val;
next;
prev;
constructor(val, next) {
constructor(val, next, prev) {
this.val = val === undefined ? 0 : val; // 节点值
this.next = next === undefined ? null : next; // 指向后继节点的指针(引用)
this.prev = prev === undefined ? null : prev; // 指向前驱节点的指针(引用)