Advent of Code 2026: Day 01 0 ▲ Daniel Nitsikopoulos 2 days ago · Tech · hide It's that time of year again, when I get excited about a programming advent calendar, and then forget about it later in December! Though, this year, there are only a handful of puzzles, so I feel like it should be achievable to do them all this time!So without further ado, here is Day 1.A nice and easy start, that saw me taking longer that I expected to remember some Ruby APIs that I didn't use as often!Part 1:We were asked to find the 3 most common items in a list, then multiply them together to come up with an answer.input.tally.sort_by { |k,v| v }.reverse.first(3).flat_map{|p| Integer(p[0]) }.inject(:*)⭐️ A fairly simple solution — tally all the items, sort them by the number of times they appear, then multiply.Part 2:Oh no, we actually needed the 3 least common items in the list:input.tally.sort_by { |k,v| v }.first(3).flat_map{|p| Integer(p[0]) }.inject(:*)⭐️ Pretty much the same as the first one, but leaving the list in ascending order of popularity, and taking the first 3 items… Commenting on Bubbles has been removed. Why? If you want to talk about this post, write to the author, use the comments on their blog if it has them, or reply with a "RE:" post on your own blog. Suggestions? feedback@bubbles.town