Home

Awesome

adventOfCode(Language.JAVA)

Hi there! Thanks for checking out my Advent of Code repo!

I solve Advent of Code problems in Java, making extensive use of its Stream API. I also like to refactor generic concepts into abstractions, to keep the code as easy to read as possible. Though sometimes I still succumb to the chaos monster!

Feel free to use this repo to learn about solution directions, or fork it as a template for your own solutions :)

2023

Days

2022

Days

Console output

Day 1:
Part 1: 67633
Part 2: 199628

Day 2:
Part 1: 15523
Part 2: 15702

Day 3:
Part 1: 7742
Part 2: 2276

Day 4:
Part 1: 485
Part 2: 857

Day 5:
Part 1: FRDSQRRCD
Part 2: HRFTQVWNN

Day 6:
Part 1: 1707
Part 2: 3697

Day 7:
Part 1: 1444896
Part 2: 404395

Day 8:
Part 1: 1713
Part 2: 268464

Day 9:
Part 1: 5735
Part 2: 2478

Day 10:
Part 1: 14420
Part 2: 
██████░░░░░░████░░░░██░░░░░░░░██████░░░░██████░░░░████████░░░░████░░░░██░░░░██░░
██░░░░██░░██░░░░██░░██░░░░░░░░██░░░░██░░██░░░░██░░░░░░░░██░░██░░░░██░░██░░░░██░░
██░░░░██░░██░░░░░░░░██░░░░░░░░██░░░░██░░██████░░░░░░░░██░░░░██░░░░██░░██░░░░██░░
██████░░░░██░░████░░██░░░░░░░░██████░░░░██░░░░██░░░░██░░░░░░████████░░██░░░░██░░
██░░██░░░░██░░░░██░░██░░░░░░░░██░░██░░░░██░░░░██░░██░░░░░░░░██░░░░██░░██░░░░██░░
██░░░░██░░░░██████░░████████░░██░░░░██░░██████░░░░████████░░██░░░░██░░░░████░░░░

Day 11:
Part 1: 108240
Part 2: 25712998901

Day 12:
Part 1: 425
Part 2: 418

Day 13:
Part 1: 6369
Part 2: 25800

Day 14:
Part 1: 614
Part 2: 26170

Day 15:
Part 1: 4961647
Part 2: 12274327017867

Day 16:
Part 1: 1906
Part 2: 2548

Day 17:
Part 1: 3141
Part 2: 1561739130391

Day 18:
Part 1: 3576
Part 2: 2066

Day 19:
Part 1: 1306
Part 2: 37604

Day 20:
Part 1: 5498
Part 2: 3390007892081

Day 21:
Part 1: 83056452926300
Part 2: 3469704905529

Day 22:
Part 1: 58248
Part 2: 179091

Day 23:
Part 1: 4195
Part 2: 1069

Day 24:
Part 1: 266
Part 2: 853

Day 25:
Part 1: 2=020-===0-1===2=020
Part 2: The More The Merrier

2021

Days

Console output

Day 1:
Part 1: 1184
Part 2: 1158

Day 2:
Part 1: 1507611
Part 2: 1880593125

Day 3:
Part 1: 3901196
Part 2: 4412188

Day 4:
Part 1: 45031
Part 2: 2568

Day 5:
Part 1: 6283
Part 2: 18864

Day 6:
Part 1: 352151
Part 2: 1601616884019

Day 7:
Part 1: 356992
Part 2: 101268110

Day 8:
Part 1: 383
Part 2: 998900

Day 9:
Part 1: 468
Part 2: 1280496

Day 10:
Part 1: 392421
Part 2: 2769449099

Day 11:
Part 1: 1594
Part 2: 437

Day 12:
Part 1: 3779
Part 2: 96988

Day 13:
Part 1: 647
Part 2: 
1  1 1111   11 1  1   11 111   11    11
1  1 1       1 1  1    1 1  1 1  1    1
1111 111     1 1111    1 1  1 1       1
1  1 1       1 1  1    1 111  1       1
1  1 1    1  1 1  1 1  1 1 1  1  1 1  1
1  1 1111  11  1  1  11  1  1  11   11 


Day 14:
Part 1: 3284
Part 2: 4302675529689

Day 15:
Part 1: 741
Part 2: 2976

Day 16:
Part 1: 871
Part 2: 68703010504

Day 17:
Part 1: 8911
Part 2: 4748

Day 18:
Part 1: 4207
Part 2: 4635

Day 19:
Part 1: 326
Part 2: 10630

Day 20:
Part 1: 5218
Part 2: 15527

Day 21:
Part 1: 678468
Part 2: 131180774190079

Day 22:
Part 1: 580810
Part 2: 1265621119006734

Day 23:
Part 1: 13556
Part 2: 54200

Day 24:
Part 1: 99799212949967
Part 2: 34198111816311

Day 25:
Part 1: 441
Part 2: Merry Christmas

2020

Days

Console output

Day 1:
Part 1: 270144
Part 2: 261342720

Day 2:
Part 1: 422
Part 2: 451

Day 3:
Part 1: 254
Part 2: 1666768320

Day 4:
Part 1: 222
Part 2: 140

Day 5:
Part 1: 855
Part 2: 552

Day 6:
Part 1: 7283
Part 2: 3520

Day 7:
Part 1: 238
Part 2: 82930

Day 8:
Part 1: 1420
Part 2: 1245

Day 9:
Part 1: 373803594
Part 2: 51152360

Day 10:
Part 1: 2812
Part 2: 386869246296064

Day 11:
Part 1: 2243
Part 2: 2027

Day 12:
Part 1: 820
Part 2: 66614

Day 13:
Part 1: 2935
Part 2: 836024966345345

Day 14:
Part 1: 14722016054794
Part 2: 3618217244644

Day 15:
Part 1: 1294
Part 2: 573522

Day 16:
Part 1: 26988
Part 2: 426362917709

Day 17:
Part 1: 295
Part 2: 1972

Day 18:
Part 1: 9535936849815
Part 2: 472171581333710

Day 19:
Part 1: 104
Part 2: 314

Day 20:
Part 1: 111936085519519
Part 2: 1792

Day 21:
Part 1: 2786
Part 2: prxmdlz,ncjv,knprxg,lxjtns,vzzz,clg,cxfz,qdfpq

Day 22:
Part 1: 33925
Part 2: 33441

Day 23:
Part 1: 69425837
Part 2: 218882971435

Day 24:
Part 1: 479
Part 2: 4135

Day 25:
Part 1: 16881444
Part 2: That's all folks

2019

Days

Console output

Output of running Main.java:

Day 1:
Part 1: 3514064
Part 2: 5268207

Day 2:
Part 1: 8017076
Part 2: 3146

Day 3:
Part 1: 303
Part 2: 11222

Day 4:
Part 1: 481
Part 2: 299

Day 5:
Part 1: 11049715
Part 2: 2140710

Day 6:
Part 1: 186597
Part 2: 412

Day 7:
Part 1: 116680
Part 2: 89603079

Day 8:
Part 1: 1360
Part 2: 
████ ███  █  █  ██  ███  
█    █  █ █  █ █  █ █  █ 
███  █  █ █  █ █  █ █  █ 
█    ███  █  █ ████ ███  
█    █    █  █ █  █ █ █  
█    █     ██  █  █ █  █ 

Day 9:
Part 1: 2518058886
Part 2: 44292

Day 10:
Part 1: 299
Part 2: 1419

Day 11:
Part 1: 2172
Part 2: 
  ██ ████ █    ████ ████  ██  █  █ ███ 
   █ █    █    █    █    █  █ █  █ █  █
   █ ███  █    ███  ███  █    ████ █  █
   █ █    █    █    █    █ ██ █  █ ███ 
█  █ █    █    █    █    █  █ █  █ █   
 ██  ████ ████ ████ █     ███ █  █ █   

Day 12:
Part 1: 13399
Part 2: 312992287193064

Day 13:
Part 1: 320
Part 2: 15156

Day 14:
Part 1: 485720
Part 2: 3848998

Day 15:
Part 1: 380
Part 2: 410

Day 16:
Part 1: 12541048
Part 2: 62858988

Day 17:
Part 1: 7404
Part 2: 929045

Day 18:
Part 1: 5402
Part 2: 2138

Day 19:
Part 1: 179
Part 2: 9760485

Day 20:
Part 1: 498
Part 2: 5564

Day 21:
Part 1: 19352864
Part 2: 1142488337

Day 22:
Part 1: 7860
Part 2: 61256063148970

Day 23:
Part 1: 17286
Part 2: 11249

Day 24:
Part 1: 32506911
Part 2: 2025

Day 25:
Part 1: 34095120
Part 2: MERRY CHRISTMAS!!

2018

I never did the 2018 advent of code puzzles when the event was ongoing. I'm just doing them whenever I feel like it :)

Days

Console output

Day 1:
Part 1: 433
Part 2: 256

Day 2:
Part 1: 5456
Part 2: megsdlpulxvinkatfoyzxcbvq