Loading docs/ds/binary-heap.md +2 −2 Original line number Diff line number Diff line Loading @@ -62,8 +62,8 @@ up(x) { down(x) { while (x * 2 <= n) { t = x * 2; if (t + 1 <= n && h[t + 1] < h[t]) t++; if (h[t] >= h[x]) break; if (t + 1 <= n && h[t + 1] > h[t]) t++; if (h[t] <= h[x]) break; swap(h[x], h[t]); x = t; } Loading Loading
docs/ds/binary-heap.md +2 −2 Original line number Diff line number Diff line Loading @@ -62,8 +62,8 @@ up(x) { down(x) { while (x * 2 <= n) { t = x * 2; if (t + 1 <= n && h[t + 1] < h[t]) t++; if (h[t] >= h[x]) break; if (t + 1 <= n && h[t + 1] > h[t]) t++; if (h[t] <= h[x]) break; swap(h[x], h[t]); x = t; } Loading