Write a method that returns the height of the binary tree when called on the node at
Fantastic news! We've Found the answer you've been seeking!
Question:
Write a method that returns the height of the binary tree when called on the node at the root of the tree. A single node tree should return one.
fill in the code accordingly(java)
public class Node
E data;
Node
Node
public int getHeight() {
return 0;
}
}
Related Book For
Introduction to Java Programming, Comprehensive Version
ISBN: 978-0133761313
10th Edition
Authors: Y. Daniel Liang
Posted Date: