emory-courses / dsa-java

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

[QZ4] Balance #108

Closed schun99 closed 4 years ago

schun99 commented 4 years ago

Can AVL or Red-Black Tree still be unbalanced after calling balance method? I am not sure how to answer the part where it's asking if the balance() method can fail to keep the tree balanced.

jdchoi77 commented 4 years ago

@schun99 it is asking by the way it is written, does the tree remain balanced after calling add() and remove() methods.