Options
All
  • Public
  • Public/Protected
  • All
Menu

Trie

export

Hierarchy

  • Trie

Implements

Index

Constructors

Methods

Constructors

constructor

Methods

hasWord

  • hasWord(word: string): boolean
  • Whether the trie has a given word.

    memberof

    Trie

    Parameters

    • word: string

    Returns boolean

insert

  • insert(word: string): Trie
  • Add a word to the trie.

    memberof

    Trie

    Parameters

    • word: string

    Returns Trie

prefixSearch

  • prefixSearch(keyword: string): string[]
  • fetch eligible words, which have the given prefix

    memberof

    Trie

    Parameters

    • keyword: string

    Returns string[]

Legend

  • Class
  • Class with type parameter
  • Constructor
  • Method
  • Function
  • Type alias with type parameter
  • Enumeration
  • Interface

Generated using TypeDoc