Skip to content

Commit 441efe5

Browse files
committed
Merge branch 'turing-code' of https://github.com/covid-in/TheAlgorithms-Python into turing-code
2 parents 394802a + 87aec39 commit 441efe5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

data_structures/trie/radix_tree.py

+3
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,11 @@ def print_tree(self, height: int = 0) -> None:
196196
for value in self.nodes.values():
197197
value.print_tree(height + 1)
198198

199+
199200
## write unit test for the code using unittest library with logic similar to test_trie() function
200201
## and call it from main()
201202

203+
202204
class TestRadixNode(unittest.TestCase):
203205
def test_trie(self) -> None:
204206
words = "banana bananas bandana band apple all beast".split()
@@ -229,5 +231,6 @@ def test_trie_2(self) -> None:
229231
assert root.find("foobbb")
230232
assert root.find("fooaaa")
231233

234+
232235
if __name__ == "__main__":
233236
unittest.main()

0 commit comments

Comments
 (0)