class LinkedListItem { value: any; next: LinkedListItem; constructor(val) { this.value = val; this.next = null; } }
1 2 3 4 5 6 class LinkedList { private head: LinkedListItem; constructor(item: LinkedListItem) { this.head = item; } }