This repo contains solutions for Advent of Code 2021 in Java, all wrapped in a NetBeans project.
After building, the typical way to run a certain puzzle is (from the project directory):
java -cp dist/AdventOfCode21.jar day01.Puzzle1 src/day01/input.txt
Replace day (01-25) and puzzle (1 or 2) number as needed. Some days also contain additional classes with optimized solutions or one or more example.txt
files that could be fed into the main class as a replacement for input.txt
. See source code for details.
Note that input.txt
contains the input data I received. Yours may (and probably will) be different.