• NeatNit@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    11
    arrow-down
    1
    ·
    edit-2
    7 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
      ·
      6 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
        ·
        5 days ago

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

  • CrayonRosary@lemmy.world
    link
    fedilink
    English
    arrow-up
    6
    ·
    7 days ago

    They need to fix their mobile website. It has large side margins for no reason, and the comic is tiny. I have to zoom in every time I visit to read the comic. Makes no sense.

      • CrayonRosary@lemmy.world
        link
        fedilink
        English
        arrow-up
        8
        ·
        7 days ago

        In this day and age, the regular site should serve a mobile-friendly page on a phone. There is CSS to detect the browser size and orientation and change the style.

        • thevoidzero@lemmy.world
          link
          fedilink
          English
          arrow-up
          1
          ·
          6 days ago

          Can you do it without loading a bunch of heavy scripts? Making a html responsive is always something challenging I face since I’m not a web developer. I just make htmls when I have to share some data visualization. And I couldn’t find how to make it responsive without using bootstrap, sth-ui, etc and using their classes and scripts.

          I’d love if vanilla CSS just had if statement like thing for “portrait/landscape” or “>threshold/not” for contents width and fonts.

          • Ironfacebuster@lemmy.world
            link
            fedilink
            English
            arrow-up
            7
            ·
            6 days ago

            It actually does, there’s “@media” which lets you query stuff about the browser like if it’s touchscreen vs mouse (and maximum/minimum width/height)

            Example:

            @media screen and (max-width: 1300px) {
                do stuff for screens less than 1300px
            }
            
    • Iron Lynx@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      edit-2
      6 days ago

      Sleep(1e5.9[...]), where [...] is everything else, and hope that the compiler or interpreter can handle non-integer exponents for this type of scientific notation.

      • thevoidzero@lemmy.world
        link
        fedilink
        English
        arrow-up
        2
        ·
        6 days ago

        It’d be easier to do 9e5, 8e5 and so on though. Linear decrease in time with each optimization. 1e5.9 seems risky.

        • Iron Lynx@lemmy.world
          link
          fedilink
          English
          arrow-up
          1
          ·
          5 days ago

          Depends on how and/or if you want to curve future changes. Going 1e5.9, 1e5.8, 1e5.7, … will curve logarithmically, while 9e5, 8e5, 7e5, … will curve linearly within each power of ten, then get a discontinuity at 1e5 and go 9e4 and scale linearly at a different rate.

          Of course, you’ll have to be an absolute nerd to find that a problem and there’s a nonzero chance that I’m such a nerd and I just admitted my guilt 😅