-
Notifications
You must be signed in to change notification settings - Fork 1
Trie traversal #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
…o bst Merging branch bst.
…o bst sdf building a binary search tree.
…ctures into traversal-bst g g Lines starting with '#' will be ignocquire post_order_trav. red, and an empty message aborts
…uctures into trie-traversal
| @@ -0,0 +1,93 @@ | |||
| """Module for Trie tree.""" | |||
|
|
|||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would not make multi-line comments like this, use the triple """ (that's what they are there for)
| class Trie(object): | ||
| """Trie class, which is the Trie tree.""" | ||
|
|
||
| """ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not necessary. Your comments should look like this:
"""Trie class, which is the Trie tree.
insert blah blah
contains blah blah
"""
| @@ -0,0 +1,157 @@ | |||
| """Module for Trie tree with traversal.""" | |||
|
|
|||
| # TRIE TREE TRAVERSAL (TTT) | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same with these comments
| class Trie(object): | ||
| """Trie class, which is the Trie tree.""" | ||
|
|
||
| """ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and here
| comparing = False | ||
| found = False | ||
| stack = [] | ||
| stack.append(self.root) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
compare, index, comparing, found, stack = '', 0, False, False, [self.root]
No description provided.