--- Day 1: Binning ---

December 1

Listening to: slowerpace 音楽 – digital affair デ​ジ​タ​ル​デ​ー​ト


Really begrudging AI use, so this year I'm dedicating Advent of Code to not using AI.

... I already wasn't using AI, but now I'm really not using AI. Like, extra-hard.


This one is pretty simple. In any language you can just make something like a map to get counts, find the top/bottom 3, and there's the result. Really easy with linq.

return Ids.GroupBy(s => s)
        .OrderByDescending(g => g.Count())
        .Take(3)
        .Select(g => g.Key)
        .Aggregate((a, b) => a * b);

For part 2, it's pretty trivial to just reverse the order.


Time taken: 5 minutes

My solutions for today's puzzles