/AdventOfCode19

Advent of Code 2019 / My solutions

Primary LanguageRust

Advent of Code < 2019 >

Advent of Code Rust Join Trojaners Discord

Not much to say here just go to the AdventOfCode 2019 Website and check out the puzzles. There is a new one each day that you have to solve with programming and get points.

I choose to use Rust. Not because it's my favorite language (I have none), or that it is very difficult or anything challanging in general, but it's a language I want to learn for a long time, and finally found a reason to do so.

Testing out my code

First run cargo update to install the dependencies.

After installing the dependencies you can simply run cargo run --bin dayXX (Replacing XX with a number from 1-25). You can also just build the binary with cargo build --bin dayXX, the built binary is stored in target/debug/dayXX

The debug binaries are a bit slow sometimes. You can add --release to build/run the optimized version. If you build a release binary it will be stored in target/release/dayXX.

On systems that support the bash syntax (Linux, MacOS, Linux System for Windows, git bash, ...) you can also run the run_all_days.sh shell script. The script will build all days (with the release target) and run them.

Disclaimer

The solutions here are implemented me, they might not be the best solution possible.

If I get stuck on a puzzle I will look in other solutions, but I will still implement them myself after I understood the concept.

After I implemented my version I will also try and optimize it even with inspiration from other solution, but the same rule applies: I will implement it myself when I can understand, how and why that optimization works, otherwise I won't use it.

I will also mark solutions / optimizations inspired by other ideas.

Other solutions