diff --git a/data_structures/trie/radix_tree.py b/data_structures/trie/radix_tree.py index fbf04f6e3..016e75328 100644 --- a/data_structures/trie/radix_tree.py +++ b/data_structures/trie/radix_tree.py @@ -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