Skip to main content

User-Interactive Trie that allows users to add, remove, search, and emulate search prefix guess.

Project description

Triegig

Interact with the global trie right from your localhost with the simplest commands. Forget trying to implement the data structure all by yourself when you can implement the data structure by just importing the library.

Users have the option to add, remove, search, and even emulate a search prefix predictor with this trie library.

Importing

Users can import the trie using: the command from tree import initializer().

This will import the Global Trie to your workspace.

Adding a word to the trie

Users can add words to the trie using the command:

Syntax: initializer().add_child(word).

Note: The initializer() can be set to a variable name when importing to make code much cleaner.

Removing a keyword

Users can also remove words from the trie using the command:

Syntax: initializer().delete()

The user will then be asked to type in a word, which the program will delete letter by letter from the trie.

Searching for a Word in the Trie

Users can search for words in the trie.

Syntax: initializer().search_keyword()

The user will be prompted to search for a word, and the program will return either True or False if the word is in the Trie.

Auto-Complete Simulator

Users can type a prefix and the program will return all the words in the trie that start with that very prefix.

Syntax: initializer().input_prefix()

The command will return a list of all the words in the trie that match the prefix inputted.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

triegig-0.0.1.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

triegig-0.0.1-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file triegig-0.0.1.tar.gz.

File metadata

  • Download URL: triegig-0.0.1.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.0.1 pkginfo/1.7.1 requests/2.25.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.1

File hashes

Hashes for triegig-0.0.1.tar.gz
Algorithm Hash digest
SHA256 dc87167f1c5e583e1fc60ef9a94b3082fbf5bb83221fa301e907db5788622797
MD5 d3fbad876aa9339ccaeb8e47e7369f25
BLAKE2b-256 35799d1e617e2d87b071c7a34afa2d62186ed188ba5164686f45df6308fd4d59

See more details on using hashes here.

File details

Details for the file triegig-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: triegig-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.0.1 pkginfo/1.7.1 requests/2.25.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.1

File hashes

Hashes for triegig-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 25bdb48bbb0a90e6f3e4b74143ff1c4885bd96d1573dc1b83a2ab125f6042d9f
MD5 492756ea557512f4198c7371ab4b6782
BLAKE2b-256 5a3054015de57ed77e3081483675fc353163aa45567d5fd46b6a2ad487f398e5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page