File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
src/main/java/com/thealgorithms/datastructures/trees Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,8 @@ public TreapNode(int valueParam, int priorityParam) {
38
38
value = valueParam ;
39
39
priority = priorityParam ;
40
40
size = 1 ;
41
- left = right = null ;
41
+ left = null ;
42
+ right = null ;
42
43
}
43
44
44
45
/**
@@ -279,8 +280,9 @@ public TreapNode lowerBound(int value) {
279
280
if (current .value >= value ) {
280
281
lowerBoundNode = current ;
281
282
current = current .left ;
282
- } else
283
+ } else {
283
284
current = current .right ;
285
+ }
284
286
}
285
287
286
288
return lowerBoundNode ;
@@ -300,8 +302,9 @@ public TreapNode upperBound(int value) {
300
302
if (current .value > value ) {
301
303
upperBoundNode = current ;
302
304
current = current .left ;
303
- } else
305
+ } else {
304
306
current = current .right ;
307
+ }
305
308
}
306
309
307
310
return upperBoundNode ;
You can’t perform that action at this time.
0 commit comments