• NeatNit@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    11
    arrow-down
    1
    ·
    edit-2
    8 days ago

    Really annoys me that this is actually O(n log n) because for large enough n the merge sort will take longer than n*1e6 second. Randall should know better!

    • Gustephan@lemmy.world
      link
      fedilink
      English
      arrow-up
      5
      arrow-down
      1
      ·
      7 days ago

      You should know better too! Behaviour at large n is irrelevant to “best case” complexity analysis of sorting algorithms

      • NeatNit@discuss.tchncs.de
        link
        fedilink
        English
        arrow-up
        2
        ·
        6 days ago

        Of course it still matters, you just take the best case for n as n→∞, instead of the worst or average case.