typescript-algorithms-and-datastructures
Version:
Useful algorithms and Data structures written in typescript.
13 lines (12 loc) • 439 B
TypeScript
export declare class RadixTreeNode<T> {
word: string;
value: T;
children: RadixTreeNode<T>[];
constructor(word: string, value: T);
addChild(child: RadixTreeNode<T>): number;
isLeaf(): boolean;
getNodeWithSharedPrefix(prefix: string): RadixTreeNode<T>;
getCommonPrefix(prefix: string): string;
splitNode(sufix: string): void;
selectNextNodeFromPrefix(prefix: string): RadixTreeNode<T>;
}