tstruct
Version:
Data structures & basic algorithms library
15 lines (14 loc) • 384 B
TypeScript
export interface ITrie {
add(word: string): void;
exists(word: string): boolean;
complete(incompleteWord: string): string[];
}
export declare class Trie implements ITrie {
private _map;
constructor();
add(word: string): void;
exists(word: string): boolean;
private findLeaf;
complete(word: string): string[];
private _complete;
}