Skip to content

A Python Class to implement a Trie data structure for a list of words.

License

Notifications You must be signed in to change notification settings

ahmednooor/triepy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

# A Python Class to implement a Trie data structure for a list of words.

# USAGE:

# Import Class
from Trie import Trie

# Initialize
DICTIONARY = Trie([
    an,
    app
])

# Find a word
DICTIONARY.find('app')    # will return True
DICTIONARY.find('apple')    # will return False

# Add new word/s
DICTIONARY.add([
    apple,
    apricot
])

# Remove word/s
DICTIONARY.remove([
    app,
    apricot
])

# Get implemented Trie in the form of Python Dictionary
DICTIONARY.trie()    # will return a python dictionary

About

A Python Class to implement a Trie data structure for a list of words.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages