CharnelMouse / AdventOfCode2020

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Solutions for problems in Advent of Code 2020: https://adventofcode.com/2020

Constraints used:

  • Everything in base R, i.e. no loading of packages;
    • Exception: day 13 uses as.bigz, divq.bigz, and mod.bigz from gmp for modular arithmetic with integers too large for base R's %/% and %% to cope with. I must still write my own implementations of GCD and modular multiplicative inverse, instead of using gcd.bigz and gcdex.
  • No regex.

I started out writing for brevity/clarity rather than execution speed, but this would have lead to very long running times for some of the later days.

Some days have two scripts:

  • the "short" one focuses on brevity / ease of reading;
  • the "quick" one focuses on fast execution.

About


Languages

Language:R 100.0%