lgrthms
Version:
Algorithms and data structures for your JavaScript and TypeScript projects 🧑💻
15 lines (14 loc) • 390 B
TypeScript
export declare class Trie {
private readonly root;
private readonly endSymbol;
private _size;
constructor();
get size(): number;
insert(string: string): number;
contains(string: string): boolean;
remove(string: string): void;
autocomplete(string: string, limit?: number): string[];
getWords(): string[];
private _remove;
private _getWords;
}