Skip to content

joewoess/AdventOfCode2021

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Advent of Code 2021

My solutions to the coding challenge adventofcode written in different kind of languages :)

Code automatically takes input files day01.txt, day02.txt, etc All implemented solutions will be linked in the Challenges table with their respective languages.


Challenges

Day Challenge C# F# Kotlin Rust Python
1 Sonar Sweep Csharp FSharp Kotlin Rust Python
2 Dive! Csharp FSharp Kotlin Rust Python
3 Binary Diagnostic Csharp FSharp Kotlin Rust Python
4 Giant Squid Csharp FSharp Kotlin Rust Python
5 Hydrothermal Venture Csharp FSharp Kotlin Rust Python
6 Lanternfish Csharp FSharp Kotlin Rust Python
7 The Treachery of Whales Csharp FSharp Kotlin Rust Python
8 Seven Segment Search Csharp FSharp Kotlin Rust Python
9 Smoke Basin Csharp FSharp Kotlin Rust Python
10 Syntax Scoring Csharp FSharp Kotlin Rust Python
11 Dumbo Octopus Csharp FSharp Kotlin Rust Python
12 Passage Pathing Csharp FSharp Kotlin Rust Python
13 Transparent Origami Csharp FSharp Kotlin Rust Python
14 Challenge 14 Csharp FSharp Kotlin Rust Python
15 Challenge 15 Csharp FSharp Kotlin Rust Python
16 Challenge 16 Csharp FSharp Kotlin Rust Python
17 Challenge 17 Csharp FSharp Kotlin Rust Python
18 Challenge 18 Csharp FSharp Kotlin Rust Python
19 Challenge 19 Csharp FSharp Kotlin Rust Python
20 Challenge 20 Csharp FSharp Kotlin Rust Python
21 Challenge 21 Csharp FSharp Kotlin Rust Python
22 Challenge 22 Csharp FSharp Kotlin Rust Python
23 Challenge 23 Csharp FSharp Kotlin Rust Python
24 Challenge 24 Csharp FSharp Kotlin Rust Python
25 Challenge 25 Csharp FSharp Kotlin Rust Python

Usage

Depending on the language version, all that is need is to go into the respective folder and use their common build tool to run it.

# these are the valid optional parameters for all implementations (can be freely combined)
 --test      ... Use test input instead of puzzle input
 --debug     ... Show debug output
 --last      ... Show last challenge commited
 01 4 20     ... Number list specifying certain days to output 
# using gradle for kotlin
# or for the included gradle wrapper use gradlew (or ./gradlew on windows)
gradle run --args='01'
gradlew run --args='01'

# using dotnet for c# and f#
dotnet run -- --test

# using python3 for rust
cargo run -- 01

# using python3 for python
python3 main.py --debug

Languages used in this challenge

  • C# 10
  • Kotlin 1.6.0
  • Rust 1.56.1
  • F# 6
  • Python 3.10
  • ...

Folder structure

+---input
|   - day01.txt
|   - day02.txt
|   - ...
+---src
|   +---csharp
|   |   - csharp.csproj
|   +---fsharp
|   |   - fsharp.fsproj
|   +---kotlin
|   |   - settings.gradle.kts
|   |   +---app
|   |   |   +---adventofcode
|   +---python
|   +---rust
+---testInput
|   - day01.txt
|   - day02.txt
|   - ...
- README.md

Sample output

------------------------------------------------------------------------------
AdventOfCode Runner for 2021
Challenge at: https://adventofcode.com/2021/
Author: Johannes Wöß
Written in C# 10 / .NET 6
------------------------------------------------------------------------------
|  Day  |         1st |         2nd |
| Day01 |        1624 |        1653 |
Could not find solution for day Day02

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published