Question: Write a method called countBranches that could be added to the IntTree class and that returns the total number of branch nodes in the tree.
Write a method called countBranches that could be added to the IntTree class and that returns the total number of branch nodes in the tree. A branch node is any node that is not a leaf node.
Step by Step Solution
3.39 Rating (152 Votes )
There are 3 Steps involved in it
public int count Branches ... View full answer
Get step-by-step solutions from verified subject matter experts
