mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-02-25 10:28:39 +00:00
Compare commits
No commits in common. "d918fcbf65d16f4d280639e04596c6d6b9ed6398" and "4f29d209c865ac5ebdfe6b63c5e626d0791650ac" have entirely different histories.
d918fcbf65
...
4f29d209c8
@ -54,13 +54,6 @@ class RadixNode:
|
||||
word (str): word to insert
|
||||
|
||||
>>> RadixNode("myprefix").insert("mystring")
|
||||
|
||||
>>> root = RadixNode()
|
||||
>>> root.insert_many(['myprefix', 'myprefixA', 'myprefixAA'])
|
||||
>>> root.print_tree()
|
||||
- myprefix (leaf)
|
||||
-- A (leaf)
|
||||
--- A (leaf)
|
||||
"""
|
||||
# Case 1: If the word is the prefix of the node
|
||||
# Solution: We set the current node as leaf
|
||||
|
Loading…
x
Reference in New Issue
Block a user