Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dict-trie
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Laros
dict-trie
Commits
ccdb9104
Commit
ccdb9104
authored
Feb 15, 2017
by
Laros
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
if True return True else return False.
parent
73e91d13
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
6 deletions
+2
-6
dict_trie/dict_trie.py
dict_trie/dict_trie.py
+2
-6
No files found.
dict_trie/dict_trie.py
View file @
ccdb9104
...
...
@@ -36,9 +36,7 @@ class Trie(object):
return
node
def
__contains__
(
self
,
word
):
if
''
in
self
.
_find
(
word
):
return
True
return
False
return
''
in
self
.
_find
(
word
)
def
add
(
self
,
word
):
"""
...
...
@@ -54,6 +52,4 @@ class Trie(object):
node
[
''
]
=
{}
def
has_prefix
(
self
,
word
):
if
self
.
_find
(
word
)
!=
{}:
return
True
return
False
return
self
.
_find
(
word
)
!=
{}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment