mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-08 18:32:56 +08:00
Correction of a RuntimeException Uncompilable source code
This commit is contained in:
@ -176,9 +176,10 @@ public class AVLTree {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void setBalance(Node... nodes) {
|
private void setBalance(Node... nodes) {
|
||||||
for (Node n : nodes)
|
for (Node n : nodes) {
|
||||||
reheight(n);
|
reheight(n);
|
||||||
n.balance = height(n.right) - height(n.left);
|
n.balance = height(n.right) - height(n.left);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void printBalance() {
|
public void printBalance() {
|
||||||
|
Reference in New Issue
Block a user