Thanos Sort

https://gist.github.com/StaticallyTypedRice/b4503d567e05721c1c5122b70d5ce41b

77 points · 7 comments · view on lemmy.world

7 Comments

emuspawn@orbiting.observer · 30 pts · 1y (3 replies)

Ah, this looks like it's a snap to use.

phoenixz@lemmy.ca · 21 pts · 1y (1 reply)

Oh God no. If I had to use snap to install this, I'll pass.

lambalicious@lemmy.sdf.org · 8 pts · 1y

Then you'll need some heroes to install it, even if they're a bit of a flat pack.

Aurenkin@sh.itjust.works · 15 pts · 1y

If you have the stones to try it

kernelle@lemmy.world · 10 pts · 1y
        for i in range(1, len(a)):
            if a[i] < a[i-1]:
                like_all_things_should_be = False
                break

What's going on in Thanos' head in all that B-roll

DeltaWingDragon@sh.itjust.works · 6 pts · 1y (1 reply)

Is this like the Stalin sort?

Cirk2@programming.dev · 5 pts · 1y

Similar principle but O(log(n)) istead of Stalin sorts O(n).