Complete 2022 to 2015 entries for the annual Advent of Code challenge, written in concise idiomatic functional Scala.
As far as possible, each day's solution embraces the following approaches:
- Self-contained within a single file, depending only on the standard Scala library.
- Immutable data structures, using copy-on-write to update.
- Pure functions with side effects, such as printing to the screen, restricted to a single
main
method.
The minimal SBT project provides:
- Straightforward consistent layout of code, resources and tests.
- Unit test coverage based on the sample input.
- Continuous integration using GitHub Actions.
Day | Problem | Solution |
---|---|---|
1 | Sonar Sweep | Source |
2 | Dive! | Source |
3 | Binary Diagnostic | Source |
4 | Giant Squid | Source |
5 | Hydrothermal Venture | Source |
6 | Lanternfish | Source |
7 | The Treachery of Whales | Source |
8 | Seven Segment Search | Source |
9 | Smoke Basin | Source |
10 | Syntax Scoring | Source |
11 | Dumbo Octopus | Source |
12 | Passage Pathing | Source |
13 | Transparent Origami | Source |
14 | Extended Polymerization | Source |
15 | Chiton | Source |
16 | Packet Decoder | Source |
17 | Trick Shot | Source |
18 | Snailfish | Source |
19 | Beacon Scanner | Source |
20 | Trench Map | Source |
21 | Dirac Dice | Source |
22 | Reactor Reboot | Source |
23 | Amphipod | Source |
24 | Arithmetic Logic Unit | Source |
25 | Sea Cucumber | Source |
Day | Problem | Solution |
---|---|---|
1 | Report Repair | Source |
2 | Password Philosophy | Source |
3 | Toboggan Trajectory | Source |
4 | Passport Processing | Source |
5 | Binary Boarding | Source |
6 | Custom Customs | Source |
7 | Handy Haversacks | Source |
8 | Handheld Halting | Source |
9 | Encoding Error | Source |
10 | Adapter Array | Source |
11 | Seating System | Source |
12 | Rain Risk | Source |
13 | Shuttle Search | Source |
14 | Docking Data | Source |
15 | Rambunctious Recitation | Source |
16 | Ticket Translation | Source |
17 | Conway Cubes | Source |
18 | Operation Order | Source |
19 | Monster Messages | Source |
20 | Jurassic Jigsaw | Source |
21 | Allergen Assessment | Source |
22 | Crab Combat | Source |
23 | Crab Cups | Source |
24 | Lobby Layout | Source |
25 | Combo Breaker | Source |