|
|
@ -3,13 +3,9 @@ |
|
|
import compare from 'just-compare'; |
|
|
import compare from 'just-compare'; |
|
|
|
|
|
|
|
|
export class ListNode<T = any> { |
|
|
export class ListNode<T = any> { |
|
|
readonly value: T; |
|
|
|
|
|
next: ListNode | undefined; |
|
|
next: ListNode | undefined; |
|
|
previous: ListNode | undefined; |
|
|
previous: ListNode | undefined; |
|
|
|
|
|
constructor(public readonly value: T) {} |
|
|
constructor(value: T) { |
|
|
|
|
|
this.value = value; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
export class LinkedList<T = any> { |
|
|
export class LinkedList<T = any> { |
|
|
|