diff --git a/Tree.py b/Tree.py index 1b41ef7..b5c320f 100755 --- a/Tree.py +++ b/Tree.py @@ -10,6 +10,14 @@ import collections +#class Node: +# def __init__(self, val): +# self.value = val +# +#class Tree: +# def __init__(self): +# self.root = collections.defaultdict(Tree) + def Tree(): return collections.defaultdict(Tree) @@ -31,5 +39,15 @@ if __name__ == "__main__": t[2][3][2][1] = "qwe" t[4] = "wat" + x = Tree() + t[5] = x + for i in range(256): + y = Tree() + for j in range(10000): + x[j] = "quto" + x['a'] = y + x = y + + for i in walk(t): print(i)