Skip to content

Commit c26ef51

Browse files
committed
bah
1 parent 782ca6a commit c26ef51

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

‎v3/bintree_module.py‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# TODO: how do you set the BACKGROUND COLOR of a GraphViz node ... fill=?
22

3-
# TODO: make this work in both Python 2 and 3
4-
53
from collections import defaultdict
64

75
import GChartWrapper
@@ -266,14 +264,16 @@ def __str__(self):
266264
#print(to_graphviz_string(a))
267265

268266
t = BST()
269-
print t
270-
271-
for i in range(4):
267+
import random
268+
nums = range(10)
269+
random.shuffle(nums)
270+
for i in nums:
272271
t.insert(i)
273-
print t
274272

275-
t.delete_min()
276-
print t
273+
f = open('test.dot', 'w')
274+
t.root.graphviz_render(f)
275+
f.close()
276+
277277

278278
'''
279279
/* balanced tree hack from http://www.graphviz.org/content/FaqBalanceTree */

0 commit comments

Comments
 (0)