How do you display a binary search tree?
Posted
by fakeit
on Stack Overflow
See other posts from Stack Overflow
or by fakeit
Published on 2010-06-04T02:42:41Z
Indexed on
2010/06/07
0:52 UTC
Read the original article
Hit count: 360
homework
|binary-trees
I'm being asked to display a binary search tree in sorted order. The nodes of the tree contain strings.
I'm not exactly sure what the best way is to attack this problem. Should I be traversing the tree and displaying as I go? Should I flatten the tree into an array and then use a sorting algorithm before I display?
I'm not looking for the actual code, just a guide where to go next.
© Stack Overflow or respective owner