Hello, everybody!
I've been struggling on implementing the Binary Tree data structure with some standard functions in it.
After reading information from many sources and some work on my own, I've came up to this: http://pastebin.com/B6Gtjb61
Problems occur in the main funciton.
What I can't understand is why does the postorder traversal just reverses the input values?
Why size, height and depth are equal since when I sketch the tree on a sheet, it's much more different?
I think I make some great mistakes in the insertion of the elements and the whole idea about the root node ... but since I'm really feeling myself a rookie in this kind of structures, I'd like to ask for your help.
I'd appreciate if you give me some ideas about how to fix this mess and have some legitimate output in the main() of this program.
Thank you very much!