Can anyone give me an idea of how i can write a program that makes a binary tree so that i can test other programs that work with binary trees?
Can anyone give me an idea of how i can write a program that makes a binary tree so that i can test other programs that work with binary trees?
This site has several articles on binary trees - they could teach you how to make and use one correctly. I'm not quite sure what you mean by testing other programs that work with binary trees - could you explain this a bit more?
edit: http://www.cprogramming.com/tutorial/lesson18.html
i have a homework assignment to whrite various functions (i.e. adding leaves, counting the nodes ....)and i have to test them on trees to see if i did them right. I thought maybe i can write a program that i can create a tree at runtime?
Perhaps you should look in Prelude's corner at the Binary Tree example there.
Quzah.
Hope is the first step on the road to disappointment.