- 4 Usages Public Class Binarytree T 1 Usage Private Binarytree T Left 1 Usage Private Binarytree T Right 3 Usages 1 (41.01 KiB) Viewed 30 times
4 usages public class BinaryTree { 1 usage private BinaryTree left; 1 usage private BinaryTree right; 3 usages
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
4 usages public class BinaryTree { 1 usage private BinaryTree left; 1 usage private BinaryTree right; 3 usages
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 }