Skip to content

LMBishop/advent-of-code-2021

Repository files navigation

Advent of Code 2021

These are my solutions written in Kotlin for Advent of Code 2021.

I am using these challenges mainly to learn and get comfortable with Kotlin 😄. I won't push solutions until the day after.

Solutions

Since each solution is an entire Gradle submodule, here are quick links to each file:

Day Source code Visualisation Input
Day 01: Sonar Sweep Day01.kt - input.txt
Day 02: Dive! Day02.kt - input.txt
Day 03: Binary Diagnostic Day03.kt - input.txt
Day 04: Giant Squid Day04.kt - input.txt
Day 05: Hydrothermal Venture Day05.kt - input.txt
Day 06: Lanternfish Day06.kt - input.txt
Day 07: The Treachery of Whales Day07.kt - input.txt
Day 08: Seven Segment Search Day08.kt - input.txt
Day 09: Smoke Basin Day09.kt - input.txt
Day 10: Syntax Scoring Day10.kt - input.txt
Day 11: Dumbo Octopus Day11.kt Day11Visualisation.kt input.txt
Day 12: Passage Pathing Day12.kt - input.txt
Day 13: Transparent Origami Day13.kt - input.txt

Building and testing

To clone the repository:

$ git clone https://github.com/LMBishop/advent-of-code-2021/
$ cd advent-of-code-2021

Using the helper script

The helper script will build and run the jar for the specified day code. The working directory will be work/, the input file will be copied from the day code.

Running normal solutions

$ cd work
$ ./build.sh <day code (e.g. 01, 02, ..., 25)>

Running visualisations

(Only some solutions have visualisations.)

$ cd work
$ ./build.sh <day code (e.g. 01, 02, ..., 25)> v

Using Gradle directly

Running normal solutions

Linux / macOS:

$ ./gradlew build

Specific submodule:

$ ./gradlew <submodule>:build

Windows:

gradlew build

Running visualisations

Linux / macOS:

$ ./gradlew build -Pvisualisation=true

Windows:

gradlew build -Pvisualisation=true

All output jars will be in build/ of the respective submodules.

About

My solutions for Advent of Code 2021, written in Kotlin.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published