This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I have a servlet which reads in a bunch of ints and stores them into a binary search tree. I am printing out the tree in level order using a queue. Does anyone generally know an algorithm, pseudocode, or code to determine how I would calculate the height of the tree and the depth of each node. Thanks.
A good book on algorithms would help. There's one I have from MIT press that devotes a lot of space to graphs (trees). I believe it's named "Algorithms" or something like that. You could also ask in the general Java forums, since running in a serlvet environment isn't going to make any difference.
An IDE is no substitute for an Intelligent Developer.