Solving Advent of Code 2019

:coding:

After solving AoC 2020, it became so empty inside so I’ve decided to look into tasks from 2019. But the real truth is that I’ve heard AoC 2019 consist series of CPU-emulator problems named Intcode. This sounds very interesting for me and I wanted to check.

I’ll keep updating this while solving the problems.

Problems

  • Day 1 (easy): Arithmetic.
  • Day 2 (easy): Basic emulator (Intcode). I’ve decided to build and reuse the same CPU class. Though not sure if that won’t require introducing some hooks later to solve further problems.
  • Day 3 (easy): Coordinates.
  • Day 4 (easy): Arithmetic. Simple Brute force works.
  • Day 5 (medium): Intcode. Very interesting task. Added few more opcodes such as reading from user input and printing to stdout, and few jmp functions.
  • Day 6 (easy): Graphs. Depth first and breadth first algorithms.