Data update

This commit is contained in:
Ingy döt Net 2025-06-11 20:16:52 -04:00
parent 72eb4943cb
commit 4d5544505c
2347 changed files with 62432 additions and 16731 deletions

View file

@ -1,4 +1,4 @@
proc sort . d[] .
proc sort &d[] .
n = len d[]
# make heap
for i = 2 to n
@ -17,12 +17,8 @@ proc sort . d[] .
j = 1
ind = 2
while ind < i
if ind + 1 < i and d[ind + 1] > d[ind]
ind += 1
.
if d[j] < d[ind]
swap d[j] d[ind]
.
if ind + 1 < i and d[ind + 1] > d[ind] : ind += 1
if d[j] < d[ind] : swap d[j] d[ind]
j = ind
ind = 2 * j
.