Home

Awesome

Advent of Code 2022

All my Advent of Code repos:

 

Last year's Python was fun, so I'll keep it as my main language this year.

But to keep things interesting and (too?) challenging, I'll make my first learning steps in Clojure. If you have any advice how to improve my Clojure solutions, please open an issue or comment in any other way.

Solutions

TaskPython SolutionClojure SolutionComment for Python solution
Day 00: Helper fileaoc.pyaoc.cljUtilities I use to solve the tasks.
Day 01day01.pyday01.cljUnexpected double-newline input for the first task.
Day 02day02.pyday02.cljUsing match statement (Python 3.10+).
Day 03day03.pyday03.cljI like my Clojure solution more.
Day 04day04.pyday04.cljLook ma, no sets!
Day 05day05.pyday05.cljParsing the input like a real man.
Day 06day06.pyday06.cljThe easiest one so far.
Day 07day07.pyday07.cljThe toughest one so far.
Day 08day08.pyday08.cljLook pa, no dicts!
Day 09day09.pyday09.cljComplex numbers --> simple solution.
Day 10day10.pyday10.cljAdvent of off-by-one errors.
Day 11day11.pyday11.cljClassy monkeys.
Day 12day12.pyday12.cljStart from the end, obviously.
Day 13day13.pyday13.cljeval + pattern matching on types.
Day 14day14.pyday14.cljBoth parts in one go.
Day 15day15.pyday15.cljScan row-by-row for a hole in the scanned positions.
Day 16day16.pyday16.cljFloyd-Warshall and only traverse through the valves with positive flow.
Day 17day17.pyday17.cljThe traditional "find a cycle" task.
Day 18day18.pyday18.cljCubes are just points in 3D.
Day 19day19.pyday19.cljUngh.
Day 20day20.pyday20.cljThe traditional "just use deque.rotate" task.
Day 21day21.pyday21.cljDFS and binary search.
Day 22day22.pyday22.cljHardcoded the wrapping rules for my input. Sorry, not sorry.
Day 23day23.pyday23.cljMore complex numbers. Plain numbers are much faster.
Day 24day24.pyday24.cljSet operations for the win.
Day 25day25.pyday25.clj+/- 2 for an easy conversion.