Today’s calculations can get a little intense if you treat every numeric range as equally important. There can be a long distance between changes in the input->output relationship.

I found an interesting video from a while ago in which CFD people talk about a similar issue in deciding where to allocate computational resources in the simulation of a Mach cone, where the vast majority of the simulation is plain air with nothing interesting happening, but there is just a very small boundary in which super-interesting things are happening.

    • ah, I kind of went the opposite direction and mapped whole ranges of seeds at once through the series of maps(I think it was nlogn maybe?). It’s interesting to see the different ways of solving the same problem. (I like your solution more :) )

        • chunkystyles@sopuli.xyz
          link
          fedilink
          English
          arrow-up
          1
          ·
          10 months ago

          I did the same. My first attempt that was the same solution as part 1 with a small tweak to the input parsing to generate the ranges overflowed the heap. It was then that I really looked at the numbers and ranges involved and decided using ranges instead of individual numbers would be necessary.

    • chunkystyles@sopuli.xyz
      link
      fedilink
      English
      arrow-up
      2
      ·
      10 months ago

      My solution for part 2 ran in 2ms and I didn’t do anything too interesting to achieve that. While this topic is interesting, I’m not sure Day 5 was a good candidate for this approach.