Class SortedLinkedList<T>
Constructors
constructor
- new SortedLinkedList<T>(comparator: (a: T, b: T) => number): SortedLinkedList<T>
Parameters
- comparator: (a: T, b: T) => number
Properties
Optional
_first
_first?: LinkedListItem<T> Optional
_last
_last?: LinkedListItem<T> _size
_size: number = 0
Accessors
length
- get length(): number
Returns number
Methods
_remove
- _remove(item: LinkedListItem<T>): void
Returns void
add
- add(item: T): void
Returns void
clear
- clear(): void
Returns void
popFront
- popFront(): undefined | T
Returns undefined | T
A sorted linked list.