You need go version go1.21.x
to run the solutions.
Uncomment your wanted solution in main.go
and run it with go run main.go
in the root dir of this repository.
The input has to be put in a input.txt
file in for example: ./2023/day01/input.txt
.
- Solutions for 2023
- Day 01
- Day 02
- Day 03
- Day 04
- Solved part 2 with recursion
- Day 05
- Solved part 1 and 2 with an execution time of 2m38s and 20GB RAM usage
- Optimized part 2 with an execution time of 2m02s and 2GB RAM usage
- Day 06
- Day 07
- Day 08
- LCM Solution
- Maybe other solutions: chinese remainder theorem, cycle detection
- Day 09
- Solved with recursion for binomial coefficient
- Day 10
- Inclusive visual representation of pipe loop
- Day 11
- First solution didn't work. 4100 difference to correct answer in part 1. Couldn't find the bug, test result was correct
- Rebuild it with another solution
- Day 12
- Solved with recursion
- Without cache runtime 15min+ (didn't complete it)
- Implemented cache, runtime < 1s
- Thanks to https://github.com/mebeim/aoc/ for cache idea
- Day 17
- Used priority queue
- Thanks to teivah for generic priority queue implementation
- BFS (Breadth First Search) Solution
- Resource on path finding redblobgames
- Day 18
- The code for part 1 is purely from me and is suitable for that task. For part 2 it isn't going to cut it anymore.
- Thanks to teivah Part 2 is solved with https://stackoverflow.com/a/717367 (EDIT section)
- Another possible solution vector cross product