Hi everybody,
for example I have such a tree in c++:
23
/ \
1 45
\ / \
2 31 52
\ \
3 234
\
5
I can print this tree in this way by using breadthFirst-level method:
23,
1, 45
2, 31, 52
3, 234
5
But how can I print this tree like this:
23
1,45
-,2 | 31,52
-,- | -,3 | -,- | -,234
-,- | -,- | -,- | -,5 | -,- | -,- | -,- | -,-
At the last two line it is necessary to print null subtree of a null subtree by "-"
Please help me...