This commit is contained in:
krahets
2023-10-24 15:44:05 +08:00
parent 365620ac22
commit aae934ba24
10 changed files with 40 additions and 51 deletions

View File

@@ -102,8 +102,6 @@ comments: true
```javascript title=""
/* 链表节点类 */
class ListNode {
val;
next;
constructor(val, next) {
this.val = (val === undefined ? 0 : val); // 节点值
this.next = (next === undefined ? null : next); // 指向下一节点的引用
@@ -1213,9 +1211,6 @@ comments: true
```javascript title=""
/* 双向链表节点类 */
class ListNode {
val;
next;
prev;
constructor(val, next, prev) {
this.val = val === undefined ? 0 : val; // 节点值
this.next = next === undefined ? null : next; // 指向后继节点的引用