Question: Question 5. Write pseudo-code for a method in the BinarySearch Tree class to count the number of node balances (according to the AVL definition of

Question 5. Write pseudo-code for a method in the BinarySearch Tree class to count the number of node balances (according to the AVL definition of balance) in the BinarySearch Tree. Basically you are checking each node if it is balanced, incrementing a counter if it is balanced. Assume that the tree is a BinarySearch Tree. It should return an int, be inside the BinarySearch Tree class, and take no arguments. You can use any helper methods, class variables, as needed. (Worth 10 points) Question 5. Write pseudo-code for a method in the BinarySearch Tree class to count the number of node balances (according to the AVL definition of balance) in the BinarySearch Tree. Basically you are checking each node if it is balanced, incrementing a counter if it is balanced. Assume that the tree is a BinarySearch Tree. It should return an int, be inside the BinarySearch Tree class, and take no arguments. You can use any helper methods, class variables, as needed. (Worth 10 points)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
