7.7.8. Binary Tree Check Value Exercise

Source
https://opendsa-server.cs.vt.edu/ODSA/Books/CS3/html/BinaryTreeInfFlw.html#binary-tree-check-value-exercise

X280: Binary Tree Check Value Exercise

Write a recursive function that returns true if there is a node in the given binary tree with the given value, and false otherwise. Note that this tree is not a Binary Search Tree.
Here are methods that you can use on the BinNode objects:
1
interface BinNode {
2
  public int value();
3
  public void setValue(int v);
4
  public BinNode left();
5
  public BinNode right();
6
  public boolean isLeaf();
7
}
---