triecli module¶
- triecli.add(val: str) None ¶
Adds the given word to trie and displays the status of the operation
- Args:
val (str): The word you wish to add to the trie
- triecli.cli() None ¶
- triecli.complete(val: str) None ¶
Displays all possible completions of words from the given prefix according to existing words in the trie
- Args:
val (str): The prefix you wish to search the trie for auto-completions of
- triecli.delete(val: str) None ¶
Deletes a word from the trie if it exists and displays the status of the operation
- Args:
val (str): The word you wish to delete from the trie
- triecli.deleteall() None ¶
Deletes everything from the trie
- triecli.search(val: str) None ¶
Searches the trie for the given word and will display whether or not it was found
- Args:
val (str): The word you want to check exists in the trie
- triecli.ui() None ¶
Initiates the CLI UI with beautiful controls and easy to navigate options
- triecli.view() None ¶
Displays all the elements in the trie in a slower manner than could be done. Since this retrieves the elements of the trie using recursion it is slower but it tests the implementation of the recursive method
- triecli.viewfast() None ¶
Displays all the elements in the trie in the fastest way possible. This is done through a separate array that holds all values in the trie