problem with draving a binary tree
Posted on 2003-02-22
ok some school project.. Have to benchmark performance in AVL and BST (Ordinary tree). Done that but now i have to draw the tree in graphics mode.
ok i can draw the tree with no problem but the branches(leaves) cover each other...
Here is the sub thats suppose to do that:
if k<>NIL then
drawk(k^.l,x-(x div 2),y+20,n+1);
drawK(k^.d,x+(x div 2),y+20,n+1);
x,y are position on the screen.
n is the level
help guys :)