UNPKG

typescript-algorithms-and-datastructures

Version:
20 lines (19 loc) 679 B
import { ILinkedListItem } from "./Interfaces/ILinkedListItem"; export declare class LinkedList<T> { head: ILinkedListItem<T>; length: number; tail: ILinkedListItem<T>; static emptyListItem<T>(): ILinkedListItem<T>; static newItem<T>(prev: ILinkedListItem<T>, next: ILinkedListItem<T>, value: T): ILinkedListItem<T>; constructor(); forEach(callback: (item: T, index: number, list: LinkedList<T>) => void, thisArg?: any): void; isEmpty(): boolean; push(value: T): void; pop(): T; remove(value: T): void; shift(): T; unshift(value: T): void; private addAfter; private removeItem; private search; }