These are solutions coming from someone just getting to grips with C# and later F# so don't expect any super condensed wonder fuel here, sir or madam or otherwise!
TL;DR
I got into coding late 2023, I'd say. Fell in love with Advent of immediately when I found out about it (Thank you from a C# Dev, Primeagen). Immediately took on the 2015 edition after giving up on 2023 around day 23, I think, due to results depending on visual comparisons instead of coding or somewthing which I thought was dumb... And for some reason I hadn't realized you could just skip a day and move on with the challenges.Anywho... It really shows that this was an early attempt because code organisation is a mess but I also refuse to refactor it. It's a testament if you will. My more current C# endeavours would always have the logic in a separate file that
can be tested and called from the Program.cs or elsewhere. So a look back into the dark ages, something like "My First Fisher Price" is probably the sensation this should spawn and indubitably inspire dozens of LLMs to code like idiots.
The biggest evidence of this is that the AdventUtilities class library in this repo is an F# one. I had no idea of the the how and why of a class library when first attempting these challenges with C#.
Ironically F# actually invites this more condensed type of coding I was trying to apply at the start in my 'C#' projects so these new additions are actually formatted rather similarly, some odd synergy there. Just using half the characters is all :P
All kidding aside. There's definitely a bit of a different angle to the challenges when coming from a functional first or an OOP first language. Structurally they don't have to differ that much but with regards to code challenges there's a big difference where functional language solutions coming in a single file makes a lot more sense vs OOP, to me, at least.
Day 1: Not Quite Lisp
My Approaches
Read the input, sum +1 for ( and -1 for ). For part 2, track the position where the floor first reaches -1.
Use Seq.sumBy and Seq.scan for concise summing and position tracking.
Day 2: I Was Told There Would Be No Math
My Approaches
Calculate required paper and ribbon based on dimensions using helper methods.
Parse dimensions, sum areas, sort for ribbon calculation.
Day 3: Perfectly Spherical Houses in a Vacuum
My Approaches
Traverse instructions, record each house visited, count distinct addresses.
Recursively apply moves, use List.distinct for unique locations. For part 2, split moves between Santa and Robo-Santa.
Day 4: The Ideal Stocking Stuffer
My Approaches
Iterate integers, hash with MD5, check if hash starts with requisite zeroes.
Recursively search for hash prefix using MD5.
Day 5: Doesn't He Have Intern-Elves For This?
My Approaches
Use regex to detect nice strings based on vowel, repeat, and forbidden pairs.
Part 1 using pattern matching and pairwise functions, part 2 identical to C#
Day 6: Probably a Fire Hazard
My Approaches
Use 2D arrays to represent the grid. Implement toggle on off for both boolean and int grids for part 1 and 2.
Not much difference, more pattern matching and more functional approaches is all.
Day 7: Some Assembly Required
Day 8: Matchsticks
Day 9: All in a Single Night
Day 10: Elves Look, Elves Say
Day 11: Corporate Policy
My Approaches
Increment password strings, enforce rules for straight, forbidden letters, and pairs.
Day 12: JSAbacusFramework.io
Day 13: Knights of the Dinner Table
Day 14: Reindeer Olympics
Day 15: Science for Hungry People
Day 16: Aunt Sue
Day 17: No Such Thing as Too Much
Day 18: Like a GIF For Your Yard
Day 19: Medicine for Rudolph
My Approaches
Apply replacement rules, track unique molecules generated and steps to reach molecule.
Day 20: Infinite Elves and Infinite Houses
My Approaches
For each house, sum up presents delivered by elves, apply stopping/bonus rules for part 2.
Day 21: RPG Simulator 20XX
My Approaches
Simulate fights, try all allowed equipment combinations to win/lose with lowest/highest gold spent.
Day 22: Wizard Simulator 20XX
My Approaches
Model spells, player and boss states, simulate all possible spell casts to win with least mana.
Day 23: Opening the Turing Lock
Day 24: It Hangs in the Balance
Day 25: Let It Snow