Add a doctest for previous fix

This commit is contained in:
furthermares 2023-07-24 17:54:13 +09:00
parent 4f29d209c8
commit a5b986831b

View File

@ -54,6 +54,11 @@ class RadixNode:
word (str): word to insert
>>> RadixNode("myprefix").insert("mystring")
>>> root = RadixNode()
>>> root.insert_many(['A', 'AA'])
>>> root.nodes['A'].nodes['A'].prefix
'A'
"""
# Case 1: If the word is the prefix of the node
# Solution: We set the current node as leaf