• NeatNit@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    3 months 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
      1
      ·
      3 months 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
        0
        ·
        2 months ago

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