Time complexity isn’t even associated to the size of the list. Amazing!

  • dev_null
    link
    fedilink
    English
    arrow-up
    1
    ·
    29 days ago

    It’s not O(1) though. There is still a normal sorting algorithm sorting this list, it’s just inside the OS scheduler.

    • 𝕽𝖚𝖆𝖎𝖉𝖍𝖗𝖎𝖌𝖍@midwest.social
      link
      fedilink
      arrow-up
      3
      arrow-down
      1
      ·
      29 days ago

      I didn’t mean to imply that it was; I was referring to countless developers I’ve worked with over the years who thought hash maps were the fastest memory storage structure because they are generally O(1); they’ve mostly been ignorant of the fact that it’s only true for sufficiently small values of “1”.