Advent of Code 2024 Day 15 - 2nd Place!

Поділитися
Вставка
  • Опубліковано 14 гру 2024

КОМЕНТАРІ • 29

  • @Kyle-nt7nl
    @Kyle-nt7nl 13 годин тому +7

    Impressed by your ability to explain your thought process so thoroughly as you're rushing through the problem.
    One point you might think is interesting: for part one, we don't really have to worry about shifting all the boxes. We just need to fill the "found" open space at the end with a box. Then we put our robot on top of the box that it's pushing against. That will get us the same result as shifting all of them.

  • @bikkel77
    @bikkel77 28 хвилин тому

    Great respect for you sir! Even explaining your thoughts while you’re at it at this speed is incredible.

  • @MichelKraemer
    @MichelKraemer 3 години тому +1

    Congratulations! 🎉

  • @paulc9239
    @paulc9239 2 години тому

    Congratulation !!!
    Pretty funny to see you arrive late today and finish a the 2nd place for the part 2 ahaha

  • @acquite
    @acquite 14 годин тому +7

    only 3 seconds away from 1st 😭

  • @fredrikrodland
    @fredrikrodland 8 годин тому

    Congrats with the 2nd place. Great explanation to the problem - especially part 2!

  • @TheFrogfather1
    @TheFrogfather1 58 хвилин тому

    Sadly completely stuck on part 2 after many hours. My solution solves the small test puzzle but not the larger one. I’ll maybe have another look later.

  • @Sam_Forette
    @Sam_Forette 7 годин тому

    congrats man. love your vids

  • @Bundas102
    @Bundas102 14 годин тому +3

    Nice rank!
    I did the moves recursively where the function returns whether it could move. Part2 got a bit more complicated bc you don't want to move anything if one thing gets stuck. I ended up solving it by first only checking if things can move and if they can call it a second time and also applying the moves. But yeah, it would have been simpler to collect the coordinates to move like you,

    • @Beesman88
      @Beesman88 11 годин тому +1

      Nicely done, I was also doing recursive and in part2 it took me a while to realize I was hadoukening boxes down the line :D
      Thought about checking first but seemed like too much rewrite at the time so my quick and dirty fix I did was to just clone my map before the moveBox&&moveBoxButt so only on up and down motion of big boxes (boxbutt is scientific term for right side of box when you are reusing part1 box as left side of big box) and if it failed just revert the map. somehow performance didn't really suffer.

    • @sanv9853
      @sanv9853 11 годин тому +2

      Same here. First dfs to check valid then dfs moving as it comes back with recursion

    • @Bundas102
      @Bundas102 11 годин тому +1

      @Beesman88 Oh I didn't even consider that. I also could have just copied the map before the step and revert to it if the move failed. I was already returning whether the move was successful or not. It's always a good idea to think about the solution again after some time. It also doesn't help that puzzles drop at 6am here :D

    • @Beesman88
      @Beesman88 8 годин тому +1

      @@Bundas102 I share your exact pain as a night owl in CET time zone, last year I woke up for every task, this year i slept through 3 already and most of them I am reading the question while brewing coffee :D

    • @Bundas102
      @Bundas102 8 годин тому +1

      @@Beesman88 So far I haven't missed one this year, but I had a few days when I went to sleep at 3am, got up for AoC, got the stars and went back to sleep :D

  • @IulianYT
    @IulianYT 8 годин тому

    27:08 - afaik sets are not ordered.
    But, I was using sets for each step (I can't think of a scenario when one coordinate is added at one step, then tried to be added after some steps. So, you have the robot, then you have a set of boxes which need to move, which are adjacent to the robot, then set of boxes which need to move and are adjacent to first set of boxes, then set of boxes adjacent to second set and so on. And then added these sets to the list, so I could have order. It doesn't matter in which order you "process" boxes inside a "set", if they are "same distance" from the robot, but it makes sense to process sets one after another.

  • @billgrant7262
    @billgrant7262 10 годин тому

    Well done

  • @TheTrienco
    @TheTrienco 11 годин тому +2

    For part 1 you technically don't even need to move. If you count the boxes until you find a free spot, you just set n tiles in front of the new position to a box. You don't have to care what they were before. Though the generic way has the benefit of being reusable for sideways movement in part 2.

  • @jacobgsutton
    @jacobgsutton 2 години тому

    I was so happy to see you in second last night.

  • @thijsyo
    @thijsyo 12 годин тому +4

    Lets go, you're starting to heat up now LLM cheaters are starting to fall off 🙌

  • @MattDog_222
    @MattDog_222 14 годин тому +1

    Lol i was shocked when i solved pt1 in 16 minutes at it was 600th place, then I briefed over part 2 and i'm like crap this sucks, I wonder if anyone solved it, checked the leaderboard and ur 1 or 5 people on it!! Big W for the humans today

  • @IulianYT
    @IulianYT 9 годин тому

    Well, I did both parts, first one easier, second a bit troublesome, but once I got it working on sample inputs - it spit out correct answer for my input, which is nice, so there were no magic edge cases, or my code handled it all very well.
    But with input manipulation I got surprised again. At first(for part1) I was thinking that boxes which have obstacles from 2 consecutive sides can't move further, and it itself becomes an "obstacle". So if for part 2 there would have been something like repeat instructions 100000000000 times - I was going to do some optimizations.

  • @hisbaan
    @hisbaan 14 годин тому +1

    Surprisingly this day was also my best yet. Albiet 3236 but its my first year doing AOC and im using rust lol

  • @splendidbeaver2027
    @splendidbeaver2027 12 годин тому

    Impressive, do you have some techniques to automatize some of the thinking and not struggle on details ?

  • @cursed_nerd
    @cursed_nerd 8 годин тому

    sick

  • @yajusgakhar6969
    @yajusgakhar6969 13 годин тому

    Now I'm curious to see your keyboard

  • @yassine-sa
    @yassine-sa 38 хвилин тому

    4:08 you could have just put a box in the empty space and put the robot in the box it's next to. Tricky but not too tricky

  • @ferdynandkiepski5026
    @ferdynandkiepski5026 9 годин тому

    Why don't you use an editor with an LSP? Or even an editor with stupid autocomplete? Wouldn't that be faster?

  • @wazzadoin
    @wazzadoin 14 годин тому

    Close one! lol