Big Tree
This commit is contained in:
parent
f2810f8fa8
commit
6446dc37eb
18
Tree.py
18
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)
|
||||
|
Loading…
Reference in New Issue
Block a user