Skip to content

Commit 7b4dbcf

Browse files
committed
modified styling in if and cleared inner assignments
1 parent e90a259 commit 7b4dbcf

File tree

1 file changed

+6
-3
lines changed
  • src/main/java/com/thealgorithms/datastructures/trees

1 file changed

+6
-3
lines changed

src/main/java/com/thealgorithms/datastructures/trees/Treap.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ public TreapNode(int valueParam, int priorityParam) {
3838
value = valueParam;
3939
priority = priorityParam;
4040
size = 1;
41-
left = right = null;
41+
left = null;
42+
right = null;
4243
}
4344

4445
/**
@@ -279,8 +280,9 @@ public TreapNode lowerBound(int value) {
279280
if (current.value >= value) {
280281
lowerBoundNode = current;
281282
current = current.left;
282-
} else
283+
} else {
283284
current = current.right;
285+
}
284286
}
285287

286288
return lowerBoundNode;
@@ -300,8 +302,9 @@ public TreapNode upperBound(int value) {
300302
if (current.value > value) {
301303
upperBoundNode = current;
302304
current = current.left;
303-
} else
305+
} else {
304306
current = current.right;
307+
}
305308
}
306309

307310
return upperBoundNode;

0 commit comments

Comments
 (0)