HELLO! I have an assignment in Data Structures course regarding to trees. Please solve it using JAVA programming. Also w

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

HELLO! I have an assignment in Data Structures course regarding to trees. Please solve it using JAVA programming. Also w

Post by answerhappygod »

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).
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply