Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Trie

Hierarchy

  • Trie

Constructors

constructor

  • Returns Trie

Properties

head

head: TrieNode
property

Root Node

Methods

addWord

  • addWord(word: string): Trie
  • Parameters

    • word: string

    Returns Trie

deleteWord

  • deleteWord(word: string): Trie
  • Parameters

    • word: string

    Returns Trie

doesWordExist

  • doesWordExist(word: string): boolean
  • Parameters

    • word: string

    Returns boolean

getLastCharacterNode

  • getLastCharacterNode(word: string): null | TrieNode
  • Parameters

    • word: string

    Returns null | TrieNode

suggestNextCharacters

  • suggestNextCharacters(word: string): null | string[]
  • Parameters

    • word: string

    Returns null | string[]