Example implementations of Advent of Code 2024 in Swift.
-
Clone the repository
git clone https://github.com/BrandonLMorris/advent2024.git
-
Provide the input (see the section below)
-
Run the solution for a day.
swift run advent <day-int> [--part={one,two,both}]
For example, to run part 2 of day 3:
```sh
swift run advent 3 --part two
```
By default, both parts one and two will be run.
This package uses bundled
resources
to provide the AoC input for each day. To work properly, download the input as a
text file to the Sources/advent/Resources
directory. The name of the file
should be the numeric day followed by the .txt
extension. For example, the
full path for the first day's input should be Sources/advent/Resources/1.txt
.