Spoiler Warning: If you want to solve the challenges by yourself, don't read the code.
This directory contains the code I used to solve the challenges from Advent of Code 2017.
The following table lists the available solutions by day and language. I also added a short summary for each day. I marked the solutions which I consider especially valuable or pretty with a star (☆).
| Day | Scala | Rust | Description |
|---|---|---|---|
| 01 | x | Sum equal digits | |
| 02 | x | Sum spreadsheet min/max | |
| 03 | x | Ulam spiral fibonacci mashup | |
| 04 | x | Anagram passphrases | |
| 05 | x | Weird jump instructions | |
| 06 | x | Memory loop debugger | |
| 07 | x | Programs disc balance tree | |
| 08 | I Heard You Like Registers | ||
| 09 | x | Garbage and groups stream counting | |
| 10 | x | Knot hash | |
| 11 | x | Hex grid distances | |
| 12 | x | Connected components | |
| 13 | x | Modulus stuff like disks last year | |
| 14 | x | Grid of knot hash and connected components | |
| 15 | x | Generating number list with bitmasks | |
| 16 | x | Letter permutation program dance | |
| 17 | x | Cyclic list intertion tracking | |
| 18 | Some Intcode stuff? | ||
| 19 | x | Walking the line | |
| 20 | x | Particles | |
| 21 | Binary pattern expansion | ||
| 22 | x | Virus grid moving | |
| 23 | Some Intcode stuff? | ||
| 24 | x | Bulding bridges with values and lengths | |
| 25 | x | Turing machine | |
| Σ | 21 | 0 |
- Scala generally feels like a more sane version of Java, especially if you do functional things.
- Scala has really confusing syntax, e.g.
.filter(_.length == 1)works, but.filter(foo(_).length == 1)doesn't (the underscore can be many things) - Scala generally feels like a more ugly version of Haskell, especially if you do functional things.
- For example
Some(3).getOrElse(recursion(...))will not work, because it ain't lazy
I enjoy looking at how other coders solved the riddles to learn even more. This year I follow (A-Z):
These coders form last year didn't yet push anything this year, but I'll keep an eye open (A-Z):
- bildzeitung (Python?)
- Pyrobolser (C#)