mirror of
https://github.com/krahets/hello-algo.git
synced 2025-11-02 12:58:42 +08:00
Several bugs fixes and improvments;
This commit is contained in:
@ -8,8 +8,8 @@
|
||||
* Definition for a singly-linked list node
|
||||
*/
|
||||
class ListNode {
|
||||
val;
|
||||
next;
|
||||
val; // 节点值
|
||||
next; // 指向下一节点的引用(指针)
|
||||
constructor(val, next) {
|
||||
this.val = val === undefined ? 0 : val;
|
||||
this.next = next === undefined ? null : next;
|
||||
|
||||
Reference in New Issue
Block a user