diff options
Diffstat (limited to '2022/commentary.md')
-rw-r--r-- | 2022/commentary.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/2022/commentary.md b/2022/commentary.md index 915d769..ca2c50b 100644 --- a/2022/commentary.md +++ b/2022/commentary.md @@ -10,7 +10,7 @@ So, here's my day-by-day opinion on how this year went for me. * **[Day 2](https://github.com/hunkyjimpjorps/AdventOfCode/blob/main/2022/day-02/day-02.ipynb)**. *Rock-paper-scissors strategy.* Lots of pattern-matching; the hardest part was probably figuring out the rules of the tournament. * **[Day 3](https://github.com/hunkyjimpjorps/AdventOfCode/blob/main/2022/day-03/day-03.ipynb)**. *Find common items in rucksacks.* Another problem well-suited to declarative style. * **[Day 4](https://github.com/hunkyjimpjorps/AdventOfCode/blob/main/2022/day-04/day-04.ipynb)**. *Find overlapping and redundant ranges.* I used the [`rebellion`](https://docs.racket-lang.org/rebellion/index.html) library here for its [range](https://docs.racket-lang.org/rebellion/Ranges.html) data type, which takes care of most of the problem by itself. AoC is a good opportunity to explore a language's ecosystem. -* **[Day 5](https://github.com/hunkyjimpjorps/AdventOfCode/blob/main/2022/day-05/day-05.ipynb)**. *Move stacks of boxes around.* Linked lists make first-in, first-out queue problems like this pretty easy. The major difficulty here was actually parsing the input (and it was probably the hardest input to parse out of all the problems), but once that was resolved it was smooth sailing. +* **[Day 5](https://github.com/hunkyjimpjorps/AdventOfCode/blob/main/2022/day-05/day-05.ipynb)**. *Move stacks of boxes around.* Linked lists make first-in, last-out stack problems like this pretty easy. The major difficulty here was actually parsing the input (and it was probably the hardest input to parse out of all the problems), but once that was resolved it was smooth sailing. * **[Day 6](https://github.com/hunkyjimpjorps/AdventOfCode/blob/main/2022/day-06/day-06.rkt)**. *Find chunks of unique characters in a string.* Another one that Racket handles without difficulty -- the entire problem statement can be represented as one `for` comprehension. * **[Day 7](https://github.com/hunkyjimpjorps/AdventOfCode/blob/main/2022/day-07/day-07.rkt)**. *Parse terminal output and calculate directory sizes.* The first speedbump of the year, and probably the first day where there's a rift between "do it right" and "just get the answer". I saw a lot of solutions that properly built the file hierarchy and walked the tree to calculate directory sizes, while I just made a hashtable of absolute paths and the sizes of everything within them. * **[Day 8](https://github.com/hunkyjimpjorps/AdventOfCode/blob/main/2022/day-08/day-08.rkt)**. *Scout a forest for the treehouse site with the best visibility.* A traditional AoC "search a grid of integers for something" problem, and the first one of the year where I represented a grid as a hashtable of coordinates. Racket doesn't have great multidimensional data structures built in, but rolling my own sparse matrix representation is pretty painless. |