Skip to content

Commit c94056a

Browse files
authored
Merge pull request TheAlgorithms#688 from LeonardoGalves/master
Correction of a RuntimeException Uncompilable source code
2 parents 571315d + 55b6ff5 commit c94056a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

DataStructures/Trees/AVLTree.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,10 @@ private int height(Node n) {
176176
}
177177

178178
private void setBalance(Node... nodes) {
179-
for (Node n : nodes)
179+
for (Node n : nodes) {
180180
reheight(n);
181181
n.balance = height(n.right) - height(n.left);
182+
}
182183
}
183184

184185
public void printBalance() {

0 commit comments

Comments
 (0)