You can traverse a binary tree recursively like this: public int findMaxValue() { return max(this.node.getValue(), this.getLeftChild().findMaxValue(), this.getRightChild().findMaxValue()); } Implementing this given your Tree interface and checking for leaf nodes is left as an exercise.
I can either move the tree to the left node or to the right node. – Chris Jun 4 at 8:49 @Chris You have a method called hasLeftNode() and a method called hasRightNode() defined in the interface, use those to check if you can move to the left or right. – sverre Jun 4 at 8:51 The datamodel doesn't offer any getters for the children.
If I want to get the left node, I must use something like this: tree. MoveToLeftNode; TreeNode node = tree. GetCurrentNode; tree.
MoveToParentNode – Chris Jun 4 at 9:17 @Chris exactly, why don't you try to implement it like that? – sverre Jun 4 at 9:18.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.