Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/wrightdylan/advent-of-code-2022

:christmas_tree: Advent of Code 2022 in Rust :christmas_tree:
https://github.com/wrightdylan/advent-of-code-2022

advent-calendar advent-of-code advent-of-code-2022 aoc aoc-2022 aoc-2022-in-rust code-challenges problem-solving rust rust-lang

Last synced: about 2 months ago
JSON representation

:christmas_tree: Advent of Code 2022 in Rust :christmas_tree:

Awesome Lists containing this project

README

        

# :gift::christmas_tree: Advent of Code 2022 (Refactored) :christmas_tree::sparkles:

These are my solutions to this year's [Advent of Code](https://adventofcode.com/2022/), which will be attempted in the Rust programming language, which I am still in the process of learning. I only just found out about this a couple of months ago!

Note: I am currently refactoring to make use of `cargo-aoc` code helper ([here](https://github.com/gobanos/cargo-aoc)), and completing missing puzzles. Times that show 'xxxxxx' are not complete yet.

## Solutions

All solutions linked below:
| Day | Title | 1 :star: | 2 :star: | Solution | Rating |
|:-|:-|:-|:-|:-|:-|
| [01](https://adventofcode.com/2022/day/1) | Calorie Counting | 436ns | 10.8µs | [day01.rs](./src/day01.rs) | :smiley: |
| [02](https://adventofcode.com/2022/day/2) | Rock Paper Scissors | 32.6µs | 30.4µs | [day02.rs](./src/day02.rs) | :thinking: |
| [03](https://adventofcode.com/2022/day/3) | Rucksack Reorganisation | 53.1µs | 68.4µs | [day03.rs](./src/day03.rs) | :grin: |
| [04](https://adventofcode.com/2022/day/4) | Camp Cleanup | 406µs | 74.7µs | [day04.rs](./src/day04.rs) | :smile: |
| [05](https://adventofcode.com/2022/day/5) | Supply Stacks | 14.8µs | 23.5µs | [day05.rs](./src/day05.rs) | :sob::goberserk: |
| [06](https://adventofcode.com/2022/day/6) | Tuning Trouble | 203µs | 1.37µs | [day06.rs](./src/day06.rs) | :hugs: |
| [07](https://adventofcode.com/2022/day/7) | No Space Left On Device | 343ns | 732ns | [day07.rs](./src/day07.rs) | :sweat::weary: |
| [08](https://adventofcode.com/2022/day/8) | Treetop Tree House | 342µs | 483µs | [day08.rs](./src/day08.rs) | :confounded: |
| [09](https://adventofcode.com/2022/day/9) | Rope Bridge | xxxxxx | xxxxxx | day09.rs | :hourglass::camera: |
| [10](https://adventofcode.com/2022/day/10) | Cathode-Ray Tube | xxxxxx | xxxxxx | day10.rs | :relaxed::relieved: |
| [15](https://adventofcode.com/2022/day/15) | Beacon Exclusion Zone | xxxxxx | xxxxxx | day15.rs | :thinking::monocle_face: |
| [16](https://adventofcode.com/2022/day/16) | Proboscidea Volcanium | xxxxxx | xxxxxx | day16.rs | :hiking_boot::walking: |
| [18](https://adventofcode.com/2022/day/18) | Boiling Boulders | xxxxxx | xxxxxx | day18.rs | :sun_with_face::camera: |
| [19](https://adventofcode.com/2022/day/19) | Not Enough Minerals | xxxxxx | xxxxxx | day19.rs | :man_shrugging: |

## Notes

1. Now that I have a better understanding of how this event is run, I may start uploading single file solutions from this point on, but I may still keep them split so I can have separate comments for both parts. Instead what I'll do is refactor part B to give answers to both parts where I can. Instances of part B that do not combine both answers will have a lighter background.
2. Day 05 was torture because of that parsing. Clearly something to work on. [This](https://www.reddit.com/r/adventofcode/comments/zd1hqy/2022_day_5_i_know_i_am_overthinking_it/) meme was me.
3. Day 08 - a little point to bear in mind for future puzzles: be sure to read the example **very** *carefully* :man_facepalming:. You can save a lot of time that way, instead of wondering why the code isn't working :skull_and_crossbones:.
4. Some days I just don't have the time :hourglass:.
5. Day 15b could have been completed on time, but I really didn't want to brute force this but instead look for a more elegant solution. I've figured one out, but I will have to come back to that another time since Day 16 has been released.
6. Day 18 was such a beautiful day, the first time this month. It seemed like a real waste not to go out all day.
7. Week three is getting hard. It's reassuring to know devs with decades of exerience have found week 2 hard. I can say that I have learned a lot so far, and reading discussions I have also come away with a couple good book recommendations for algorithms, and other concepts such as dynamic programming.
8. Having finished AoC 2023, I've come back to this to refactor, and complete missing puzzles.
9. Day 5's parser is still awful even after refactoring (but not as bad as the original).