• Zagorath@aussie.zone
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    Hey, I haven’t been doing Advent this year. What was day 5’s problem and why did dicts fail?

    • bob_lemon@feddit.de
      link
      fedilink
      arrow-up
      3
      ·
      1 year ago

      There was a series of number ranges that mapped onto other ranges. The simple approach was filling dictionaries, which worked well for the example data. In the actual data, there ranges were much much larger (in the 100,000,000’s), which made the dictionaries prohibitively large.

      • Faresh@lemmy.ml
        link
        fedilink
        English
        arrow-up
        1
        ·
        11 months ago

        If each number was 8 bytes wide, it would require, if I didn’t mess up my math, 18 GB to fully represent all seeds/numbers as an array.