UNPKG

@sridhar-mani/dsa-js

Version:

A full-fledged data structure library with linked list and double linked list implementation

27 lines 818 B
import LLNode from './llnode'; export default class LinkedList<T> { private compare; private head; private tail; private length; constructor(compareFunc?: (a: T, b: T) => number); append(value: T): this; prepend(value: T): this; insert(value: T, indexTo: number): this; getLength(): number; delete(value: any): void | null; find({ value, callback }: { value?: T; callback?: (val: T) => boolean; }): LLNode<T> | null; deleteTail(): LLNode<T> | null; deleteHead(): LLNode<T> | null; getHead(): LLNode<T> | null; getTail(): LLNode<T> | null; fromArray(values: Array<T>): this; toArray(): LLNode<T>[]; toString(callback: (value: T) => string): string; reverse(): this; clear(): this; } //# sourceMappingURL=llMain.d.ts.map