HELLO! I have an assignment in Data Structures course regarding
to trees. Please solve it using JAVA programming. Also write
explanations in comments
Question : a. Create a method that counts the number of the
nodes in the AVL tree. b. Create a method that returns the maximum
and minimum height possible for `n` given number of nodes. c. Find
the predecessor and successor of a given node in the tree. d. Write
a recursive method sizeBalanced, member of the class BT (Binary
Tree), that returns true if the tree is empty, or, at every node,
the absolute value of the difference between the number of nodes in
the two subtrees of the node is at most 1. The method signature is:
public int sizeBalanced() (this method calls the private recursive
method recSizeBalanced).
HELLO! I have an assignment in Data Structures course regarding to trees. Please solve it using JAVA programming. Also w
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am