Mastodon Feed: Post

Mastodon Feed

Reblogged by cstanhope@social.coop ("Your friendly 'net denizen"):

a@exozy.me ("​") wrote:

Here's the "I Can't Believe It Can Sort" algorithm for sorting in *increasing* order, from https://arxiv.org/pdf/2110.01111:

for i in range(n):
for j in range(n):
if A[i] < A[j]:
A[i], A[j] = A[j], A[i]

I still can't believe it can sort!