4 usages public class BinaryTree { 1 usage private BinaryTree left; 1 usage private BinaryTree right; 3 usages
Posted: Mon Jun 06, 2022 4:47 pm
4 usages public class BinaryTree<T> { 1 usage private BinaryTree<T> left; 1 usage private BinaryTree<T> right; 3 usages private T data; public BinaryTree (T data) { this.data = data; } public T getData() { return data; } I E public void setLeft (BinaryTree<T> left) { this. left = left; } 1 public void setRight (Binary Tree<T> right) { this.right = right;} /* @description This method recursively computes the size of the binary tree. * @return an integer >= 1 equal to the number of nodes in the binary tree * rooted at this node. */ public int getSize() { // WRITE CODE HERE }