Skip to content

Commit 6bc1c1f

Browse files
authored
Add a doctest for previously suggested fix
1 parent 4f29d20 commit 6bc1c1f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Diff for: data_structures/trie/radix_tree.py

+5
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ def insert_many(self, words: list[str]) -> None:
4343
words (list[str]): list of words
4444
4545
>>> RadixNode("myprefix").insert_many(["mystring", "hello"])
46+
47+
>>> root = RadixNode()
48+
>>> root.insert_many(['A', 'AA'])
49+
>>> root.nodes['A'].nodes['A'].prefix
50+
'A'
4651
"""
4752
for word in words:
4853
self.insert(word)

0 commit comments

Comments
 (0)