The Bard's Lemmy
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
0x4E4F@infosec.pub to Programmer Humor@programming.devEnglish · 2 years ago

Not my problem sort

infosec.pub

message-square
48
link
fedilink
607

Not my problem sort

infosec.pub

0x4E4F@infosec.pub to Programmer Humor@programming.devEnglish · 2 years ago
message-square
48
link
fedilink
  • xmunk@sh.itjust.works
    link
    fedilink
    arrow-up
    80
    ·
    2 years ago

    Guaranteed to sort the list in nearly instantaneous time and with absolutely no downsides that are capable of objecting.

    • frezik@midwest.social
      link
      fedilink
      arrow-up
      39
      ·
      2 years ago

      You still have to check that it’s sorted, which is O(n).

      We’ll also assume that destroying the universe takes constant time.

      • BatmanAoD@programming.dev
        link
        fedilink
        arrow-up
        36
        ·
        2 years ago

        In the universe where the list is sorted, it doesn’t actually matter how long the destruction takes!

        • FiskFisk33@startrek.website
          link
          fedilink
          arrow-up
          7
          ·
          2 years ago

          amortized O(0)

      • Benjaben@lemmy.world
        link
        fedilink
        arrow-up
        8
        ·
        2 years ago

        We’ll also assume that destroying the universe takes constant time.

        Well yeah just delete the pointer to it!

        • PoolloverNathan@programming.dev
          link
          fedilink
          arrow-up
          2
          ·
          2 years ago

          universe.take()

    • vithigar@lemmy.ca
      link
      fedilink
      arrow-up
      14
      ·
      2 years ago

      Except you missed a bug in the “check if it’s sorted” code and it ends up destroying every universe.

      • db2@lemmy.world
        link
        fedilink
        arrow-up
        5
        ·
        2 years ago

        There’s a bug in it now, that’s why we’re still here.

    • frezik@midwest.social
      link
      fedilink
      arrow-up
      1
      ·
      2 years ago

      deleted by creator

Programmer Humor@programming.dev

programmer_humor@programming.dev

Subscribe from Remote Instance

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
    • If the mod doesn’t find it funny, you’re banned. Ha-ha!.. For real: do not use the community for “statements”. There are other places for such content. Keep it chill and funny.
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 56 users / day
  • 1.54K users / week
  • 3.42K users / month
  • 8.72K users / 6 months
  • 1 local subscriber
  • 33.3K subscribers
  • 1.79K Posts
  • 31.6K Comments
  • Modlog
  • mods:
  • Feyter@programming.dev
  • adr1an@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • BE: 0.19.14
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org