mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-02-25 02:18:39 +00:00
improve doctest readability
This commit is contained in:
parent
a5b986831b
commit
d918fcbf65
@ -56,9 +56,11 @@ class RadixNode:
|
|||||||
>>> RadixNode("myprefix").insert("mystring")
|
>>> RadixNode("myprefix").insert("mystring")
|
||||||
|
|
||||||
>>> root = RadixNode()
|
>>> root = RadixNode()
|
||||||
>>> root.insert_many(['A', 'AA'])
|
>>> root.insert_many(['myprefix', 'myprefixA', 'myprefixAA'])
|
||||||
>>> root.nodes['A'].nodes['A'].prefix
|
>>> root.print_tree()
|
||||||
'A'
|
- myprefix (leaf)
|
||||||
|
-- A (leaf)
|
||||||
|
--- A (leaf)
|
||||||
"""
|
"""
|
||||||
# Case 1: If the word is the prefix of the node
|
# Case 1: If the word is the prefix of the node
|
||||||
# Solution: We set the current node as leaf
|
# Solution: We set the current node as leaf
|
||||||
|
Loading…
x
Reference in New Issue
Block a user