Skip to content

Latest commit

 

History

History
30 lines (20 loc) · 1.45 KB

README.md

File metadata and controls

30 lines (20 loc) · 1.45 KB

Advent of Code 2022

run unit tests

Introduction

Advent of Code

Advent of Code is an Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved in any programming language you like.

Repository Structure

This repository's structure is based on shpikat/advent-of-code-2018.

I'm planning to include unit tests and a GitHub Action to run those tests.

Things I Learned

  • In Day 11 part 2, we will generate very large numbers. I initially tried using a BigInteger to store the values, but that wasn't effective. After looking into what others had done, I found that most people solved the question using modular arithmetic, specifically by applying the Chinese Remainder Theorem, i.e. calculate a least common multiple of all the monkey's divisors, then modulo each item's worry level by that LCM.