diff --git a/problems/链表理论基础.md b/problems/链表理论基础.md index 02b7029e..109aa1ed 100644 --- a/problems/链表理论基础.md +++ b/problems/链表理论基础.md @@ -168,6 +168,32 @@ public class ListNode { } ``` +JavaScript: + +```javascript +class ListNode { + val; + next = null; + constructor(value) { + this.val = value; + this.next = null; + } +} +``` + +TypeScript: + +```typescript +class ListNode { + public val: number; + public next: ListNode = null; + constructor(value: number) { + this.val = value; + this.next = null; + } +} +``` + Python: