Advent of Code 2024 | Day 01 "Historian Hysteria"

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

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

  • @vegeta3993
    @vegeta3993 2 месяца назад +13

    First line efficiency: 😁
    First line readability: 🗿

  • @havenisse2009
    @havenisse2009 2 месяца назад

    You are really good. Explaining what you did here with list, map, zip etc is worth an entire video

  • @galactic_fx
    @galactic_fx 2 месяца назад +1

    THE GOAT IS BACK 👑👑👑

  • @TheFrogfather1
    @TheFrogfather1 2 месяца назад

    It's that time of year again! Nice straightforward puzzle to kick things off.

  • @fredoverflow
    @fredoverflow 2 месяца назад

    Glad to see you back for another round of Advent of Code 🤩

  • @priyanshshah6905
    @priyanshshah6905 2 месяца назад

    my goat is back!!!!

  • @matteolugli1607
    @matteolugli1607 2 месяца назад

    Welcome baaaaack!

  • @tdcode
    @tdcode 2 месяца назад

    love your solution

  • @acters124
    @acters124 2 месяца назад

    yay, youtube finally starting to understand what I want in my feed

  • @kayebennett7867
    @kayebennett7867 2 месяца назад

    One small question. For the second part, wouldn't it be better to create a frequency dictionary of the lists or using a collections.Counter? That way you only loop over each list once, while in this solution, by calling r.count(x), you are looping over the right list for each element in the left list.

    • @hyper-neutrino
      @hyper-neutrino  2 месяца назад

      this is true - in future videos i may discuss optimizations, but this is not worth the effort at this input size when the win condition is how fast you get your answer as opposed to how fast your code is

    • @Hillgrov
      @Hillgrov Месяц назад

      @@hyper-neutrino AoC has a win condition? wth? I thought it was nice small problems we could challenge ourselves with.

    • @hyper-neutrino
      @hyper-neutrino  Месяц назад +1

      it is, i am just referring to the global leaderboard which is the only semblance of win condition it has. you are, of course, completely welcome to ignore it and i would recommend that for beginners, but i don't because i am competing for it (at least i have been in the past few years, not sure how long i will keep caring about it)

  • @brunokingz
    @brunokingz 2 месяца назад

    That was a fun easy one... I hope it won't get deranged like last year's lol

  • @flomol
    @flomol 2 месяца назад

    You should do it in C so you can actually write the code yourself instead of calling 16 functions

    • @hyper-neutrino
      @hyper-neutrino  2 месяца назад +7

      i mean i could but the whole point is to solve the problem fastest lol

    • @antoineleduc7611
      @antoineleduc7611 Месяц назад

      There is no « merit » in reinventing the wheel each time for small functions
      It’s neither the spirit of this challenge wether you are competing in the leaderboard or challenging yourself, nor it is in the spirit of what programming should be for human society
      I would recommend not deluding yourself into thinking otherwise @flomol
      And no, this is not me saying this as an excuse for incompetence, I did code in C for about 5 years, did some fairly difficult stuff with it, and wouldn’t do it again