Skip to content

Commit 269227c

Browse files
committed
Merge pull request phishman3579#6 from nirro01/patch-1
Update BinaryHeap.java to correct a comment.
2 parents eb62cb0 + 1f0f05e commit 269227c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/com/jwetherell/algorithms/data_structures/BinaryHeap.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ protected void heapUp(int nodeIndex) {
140140
if ((type == Type.MIN && parent != null && value.compareTo(parent) < 0)
141141
|| (type == Type.MAX && parent != null && value.compareTo(parent) > 0)
142142
) {
143-
// Node is less than parent, switch node with parent
143+
// Node is greater/lesser than parent, switch node with parent
144144
this.array[parentIndex] = value;
145145
this.array[nodeIndex] = parent;
146146
} else {

0 commit comments

Comments
 (0)