awful.systems
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
QuentinCallaghan to Programmer Humor@programming.devEnglish • 6 months ago

Thanos Sort

gist.github.com

external-link
message-square
5
fedilink
79
external-link

Thanos Sort

gist.github.com

QuentinCallaghan to Programmer Humor@programming.devEnglish • 6 months ago
message-square
5
fedilink
Thanos Sort. GitHub Gist: instantly share code, notes, and snippets.
alert-triangle
You must log in or register to comment.
  • David From Space
    link
    fedilink
    English
    29•6 months ago

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

    • @Aurenkin@sh.itjust.works
      link
      fedilink
      14•6 months ago

      If you have the stones to try it

  • @kernelle@lemmy.world
    link
    fedilink
    10•6 months ago
            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
    link
    fedilink
    6•6 months ago

    Is this like the Stalin sort?

    • @Cirk2@programming.dev
      link
      fedilink
      5•6 months ago

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

Programmer Humor@programming.dev

!programmer_humor@programming.dev

remote_follow_modal_title

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programmer_humor@programming.dev

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics
  • 1.64K users / day
  • 3.57K users / week
  • 6.61K users / month
  • 14K users / 6 months
  • 23.2K subscribers
  • 961 Posts
  • 19.9K Comments
  • Modlog
  • mods:
  • Feyter
  • adr1an
  • @BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne
  • BE: 0.19.3
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org