day 22 - advent of code 2024

Поделиться
HTML-код
  • Опубликовано: 20 янв 2025

Комментарии • 7

  • @flwi
    @flwi 24 дня назад +1

    Nice!
    I was yelling at the screen "only the first occurrence!!", since I got lucky and caught this tiny information snippet on first read through the instructions.
    I liked the session about the performance optimization. I'm not familiar with divan and learned a lot. Especially that there is a thing that allocates things in rust and you can influence how it behaves ;-)

    • @flwi
      @flwi 23 дня назад

      oh, btw - there was an easy speed gain by using rayon for the iterator over the seeds. Had to replace the outer fold by reduce. Time for part 2 came down from 192ms to 47ms.

  • @GelidGanef
    @GelidGanef 29 дней назад

    This series is the only reason i know what day it is in December or have had the impetus to do any of my Christmas shopping

  • @Moof_Woof
    @Moof_Woof 29 дней назад

    Medium spoilers for day 21:
    There's probably lots of ways to solve the day (memoization perhaps?), but there was one realisation that made the day bearable for me:
    Keypad inputs always Start and End on A.
    This means that there's so much state that can just be ignored.
    More in depth spoilers:
    You don't even need to keep the order you do the button presses, A robot at stage X needs to press a specific button Y times, which is all you need to know to calculate how many button presses that took for the robot at stage X+1.
    I did need to mess about with the order of inputs to this calculate function to avoid going into the invalid blank space, probably what I spent most time on.
    I do agree that I didn't really enjoy the puzzle. And I waited until today to tackle it.

  • @AhmadAli-kv2ho
    @AhmadAli-kv2ho 29 дней назад +1

    Its already day 22??? Damn time flies lol

  • @funkyprogrammer8005
    @funkyprogrammer8005 29 дней назад

    Which IDE is this? Thx.

    • @chrisbiscardi
      @chrisbiscardi  29 дней назад +2

      @@funkyprogrammer8005 vscode with basically everything turned off and a right hand sidebar