This repository contains my solutions to the Advent of Code 2022 questions written in python. The solutions run in reasonable time, except for a few (including day 16 and day 22) which may take 15 minutes or so ... .
Most of my solutions just address Part II of each day's question, as I didn't have the foresight to preserve my Part I solutions and often simply overwrote them with my Part II solutions.
- learning about the different behaviours of standard data types in python (lists, sets, dicts, generators)
- list comprehension: this is the way! (also
zip
and*
) - learning about the usefulness of
collections
(in particular,defaultdict
) anditertools
- learning about the usefulness of
frozenset
etc., and hashable types (andpickle
) - recalling what I once knew about
numpy
- learning about bitwise operations
- solving the 'solve for 0' part of day 21 very fast using some of Newton's ideas
- solving the DFS search of day 19 fast with not-always-correct-but-still-reasonable constraints