0
/ 5.0
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...
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:
interface BinNode {
public int value();
public void setValue(int v);
public BinNode left();
public BinNode right();
public boolean isLeaf();
}
Write the BTcheckval
function below:
Your feedback will appear here when you check your answer.