We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4f7587e commit 7a91778Copy full SHA for 7a91778
1 file changed
data_structures/trie/radix_tree.py
@@ -64,9 +64,7 @@ def insert(self, word: str) -> None:
64
"""
65
# Case 1: If the word is the prefix of the node
66
# Solution: We set the current node as leaf
67
- # if self.prefix == word and not self.is_leaf: -------------------------------issue fix
68
- # self.is_leaf = True --------------------------------------------------------------issue fix
69
-
+
70
# Case 2: The node has no edges that have a prefix to the word
71
# Solution: We create an edge from the current node to a new one
72
# containing the word
0 commit comments