The fifth day of Advent of Code was yesterday 12/05/2024! If you’re here for the first time today, don’t forget to read the posts about Day 1, Day 2, Day 3, and Day 4!
I classified the fifth problem as easy (part 1) and medium (part 2).
Tips
-
The problem has two inputs, a list of rules and a list of updates.
-
The pages present in the rules list (X) must be printed before pages (Y). Since the same page X can have multiple Y’s, the rules are a dictionary with integer keys and lists of integers as values.