My solutions for Advent Of Code.
The 2021 directory contains my solutions for the year 2021 in ANSI C. At the time, I didn't know C very well, and it shows. All solutions pass valgrind without errors, but there are some unnecessary heap allocations and weird constructs here and there.
The 2022 directory contains my solutions for the year 2022 in the following languages, a different one per each day. I generated the list below by randomly shuffling a list of languages before this year's AoC began. This prevents me from choosing a language that would make the given task trivial.
I had to make a change, though. Originally, I had planned to solve day 11 in OCaml. After spending several hours trying to compile a piece of code that depended on the Base library, I gave up and rewrote the program in Haskell. When the user needs to install several complex build tools only to compile a simple hello world program, it's no wonder that OCaml is barely used. To keep the languages unique, I implemented day 20 in Java instead.
- C
- Bash
- Prolog
- JavaScript
- Elixir
- C++
- PHP
- Erlang
- Awk
- Fennel
- Haskell
- Go
- Python
- R
- Kotlin
- Zig
- Scheme
- Julia
- Ruby
- Java
- Scala
- Clojure
- C#
- Perl
- Lua
The 2023 directory contains my solutions for the year 2023 in TypeScript, which I needed to learn at the time.
$ cd 2023
$ npm install
$ npx prettier . --write
$ npx eslint .