1 class LinkedListItem {
2 value: any;
3 next: LinkedListItem;
4
5 constructor(val) {
6 this.value = val;
7 this.next = null;
8 }
9 }
10
11
22
33
44
55
66
7 class LinkedList {
8 private head: LinkedListItem;
9 constructor(item: LinkedListItem) {
10 this.head = item;
11 }
12 }
13