Skip to content

Puzzle solutions for advent of code 2022, 2023 and 2024

License

Notifications You must be signed in to change notification settings

dlesbre/advent-of-code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Advent of Code

Puzzle solutions for advent of code 2022 and 2024, in OCaml, as well as advent of code 2023, in Rust. Most run under 1s, all run under 5 minutes.

Building just requires a not too old ocamlopt or rustc. I tested it on OCaml 4.14.0 and Rust 1.71.1 (but it should work with other versions as well).

To compile and test on a perticular day's puzzle, use

make YEAR=2022 DAY=03 compile  # compiles
make YEAR=2022 DAY=03          # compiles and runs (part 2) on test date
make YEAR=2022 DAY=03 run      # compiles and runs on real data

Note: test and data files are not included in this repository for copyright reasons. In order to run the solution (make or make run), go to the corresponding AOC puzzle and copy:

  • the example input to <year>/<day>/puzzle_test.txt
  • the true input to <year>/<day>/puzzle_data.txt