Closed JonathanKimchi closed 3 years ago
Either of the three input trees is balanced. So I assume that I would not add such test cases.
Okay, thank you. I will move forward with the understanding that the three trees listed are considered to be balanced for the criteria of this quiz.
Please take a look at : https://github.com/emory-courses/dsa-java/issues/117
This question builds on the previous questions asked for this quiz.
So the expected output is a balanced tree. Say we get these trees as inputs:
This is what we were given as a logic map from Dr. Choi:
Override the balance() method that first checks the following conditions: node is the only child & node’s parent is the right child of node's grand parent & node’s uncle has only one child.
Correct me if I'm wrong, but based off of the ruleset in the logic map given to us, the second input wouldn't execute any rotations. This would leave the tree unbalanced, wouldn't it?