Add the remain JavaScript code (Chapter of Array and Linkedlist)

This commit is contained in:
justin
2022-12-12 21:13:49 +08:00
parent 80ef96da69
commit f6939dab89
4 changed files with 310 additions and 0 deletions

View File

@ -0,0 +1,17 @@
/*
* File: ListNode.js
* Created Time: 2022-12-12
* Author: Justin (xiefahit@gmail.com)
*/
/**
* Definition for a singly-linked list node
*/
class ListNode {
constructor(val, next) {
this.val = val === undefined ? 0 : val;
this.next = next === undefined ? null : next;
}
}
module.exports = ListNode;