emory-courses / dsa-java

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

[QZ4] Should the output tree a balanced tree? #114

Closed NuntuPu closed 4 years ago

NuntuPu commented 4 years ago

Do we need to have the tree completely balanced like and AVL tree? Or do we just need to make it where the left tree gets added to before the right?

For example, is this tree a correct output?

-

image_50590209

lujiaying commented 4 years ago

I am waiting for Dr. Choi's response. But at this moment, please assume we want the output tree a balanced one.

@ananthupucha An update: the output tree is expected as a balanced tree.

lujiaying commented 4 years ago

Please take a look at : https://github.com/emory-courses/dsa-java/issues/117