Advent of Code 2020 Day 21
Today's Advent of Code puzzle made yesterday's seem like a week-long project that was compressed into only a few hours of actual coding and the puzzle today, was really just creating a map of lists, cleaning up the map to be to a single item in a list, then using that to do some further determinations of counts of things. I really don't have much to say about the day 21 work, since it was really just a straightforward and pretty easy process.
The one thing that I will say about the puzzle was I got to a better state of using java 8 streams to get to from a list of items to a map in some way, though at least some parts of this puzzle required varying degrees of actual for loops because state was stored outside of the loop. In part two, I copied the part one code into a separate method which ended up being all I needed to get to the easy processing for part two. Both part one and part two relied on the list of Food
objects that I created as well as the map of ingredient-to-allergen that I had created in a separate method. Part two didn't even need the List
of Food
objects. If you want to join my Advent of Code leaderboard, feel free to join with the code: 699615-aae0e8af
.