emory-courses / dsa-java

Data Structures and Algorithms in Java
https://emory.gitbook.io/dsa-java/
42 stars 55 forks source link

[QZ#4] Are we assuming 3 is the root node? #113

Closed Shreya3554 closed 4 years ago

Shreya3554 commented 4 years ago

Replace # in the title with the appropriate quiz number. Do we only need to take into account the 4 cases presented in the homework or do we need to also take into account whether the "3" node has a parent?

lujiaying commented 4 years ago

From my perspective, during the actual grading process, we would add more test cases.

Shreya3554 commented 4 years ago

But I'm still not understanding how that works. After balancing the example cases, do we need to balance up the tree?

lujiaying commented 4 years ago

About the output tree, it is expected to be a balanced one. please also refer to https://github.com/emory-courses/dsa-java/issues/114

Shreya3554 commented 4 years ago

Thank you! So is the tree that was drawn in @114 considered to be a correct output?

lujiaying commented 4 years ago

Thank you! So is the tree that was drawn in @114 considered to be a correct output?

Again, please check if the output is a balanced tree.