AOC Day 9 Discussion - Fit to be tied #768
Replies: 6 comments 3 replies
-
I got roped in by this one. Used numpy tho - that was fun! solve |
Beta Was this translation helpful? Give feedback.
-
Finally done! Was able to refactor after seeing part to using the same logic, just abstracted, which was nice. Right up until my logic didn't turn out to be right 😂 |
Beta Was this translation helpful? Give feedback.
-
Today just fucking destroyed me. I spent far too long thinking my code was working for the test cases, when I had in fact made two errors that were cancelling each other out - forgot to add the origin to the tail position list, and also was not only adding unique values, because - like an idiot - I forgot that Set doesn't work on arrays because Anyhow it's over and I hate everything. https://github.com/doleraj/adventofcode/blob/main/aoc2022/src/day09/index.ts |
Beta Was this translation helpful? Give feedback.
-
Had a busy weekend so far. Here's 9. I really like my solution but took forever to nail part 2 because I just got lost in the sauce I guess. Got to use the forgotten sibling of reduce, scan, so that's neat. |
Beta Was this translation helpful? Give feedback.
-
again, imma have to study @tkshill's approach to this as mine took way more code, although on reflection 30 lines or so was printing it out so that my tests were visual and for the most part I like the way the rest reads |
Beta Was this translation helpful? Give feedback.
-
Discussion of solutions for Advent of Code Day 9 here.
Don't forget about the VC Advent of Code private leaderboard:
Go to leaderboard/private
Use join code 363496-e6f42283
Beta Was this translation helpful? Give feedback.
All reactions