0
/ 4.0
Write a recursive function int BTsumall(BinNode root) that returns the sum of the values for all of the nodes of the binary tree with...
Write a recursive function int BTsumall(BinNode root) that
returns the sum of the values for all of the nodes of the
binary tree with root root.
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 BTsumall function below:
Your feedback will appear here when you check your answer.