We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eb62cb0 commit 1f0f05eCopy full SHA for 1f0f05e
src/com/jwetherell/algorithms/data_structures/BinaryHeap.java
@@ -140,7 +140,7 @@ protected void heapUp(int nodeIndex) {
140
if ((type == Type.MIN && parent != null && value.compareTo(parent) < 0)
141
|| (type == Type.MAX && parent != null && value.compareTo(parent) > 0)
142
) {
143
- // Node is less than parent, switch node with parent
+ // Node is greater/lesser than parent, switch node with parent
144
this.array[parentIndex] = value;
145
this.array[nodeIndex] = parent;
146
} else {
0 commit comments