Class TrieNode
Constructors
constructor
- new TrieNode(character: string, isCompleteWord?: boolean): TrieNode
-
Parameters
-
character: string
-
isCompleteWord: boolean = false
Properties
character
character: string
children
isCompleteWord
isCompleteWord: boolean
Methods
addChild
- addChild(character: string, isCompleteWord?: boolean): TrieNode
-
Parameters
-
character: string
-
isCompleteWord: boolean = false
getChild
-
Parameters
hasChild
- hasChild(character: string): boolean
-
Parameters
Returns boolean
hasChildren
-
Returns boolean
removeChild
- removeChild(character: string): TrieNode
-
Parameters
suggestChildren
- suggestChildren(): string[]
-
Returns string[]
toString
-
Returns string
Character