Giter VIP home page Giter VIP logo

aoc2021's Introduction

Advent of Code 2021 Solutions

Running the solutions

To run a particular solution call aoc:solve/2 with the day and the part specified. The day is an atom like day1 and the part is either p1 for part one or p2 for part two.

The output from each solution identifies which day and part ran, the output for that problem, and the time it took to run.

To run all the solutions call aoc:solve_all().

Start by cloning the repo and running rebar3 shell for a REPL.

aoc:solve_all() = [
    {day1,p1,1688,{0.028,ms}},
    {day1,p2,1728,{0.057,ms}},
    {day2,p1,1714680,{0.025,ms}},
    {day2,p2,1963088820,{0.027,ms}},
    {day3,p1,3895776,{0.394,ms}},
    {day3,p2,7928162,{1.080,ms}},
    {day4,p1,5685,{3.030,ms}},
    {day4,p2,21070,{5.172,ms}},
    {day5,p1,5294,{79.632,ms}},
    {day5,p2,21698,{150.635,ms}},
    {day6,p1,358214,{0.125,ms}},
    {day6,p2,1622533344325,{0.330,ms}},
    {day7,p1,364898,{9.798,ms}},
    {day7,p2,104149091,{22.067,ms}},
    {day8,p1,274,{1.332,ms}},
    {day8,p2,1012089,{3.073,ms}}
].

aoc:solve(day1, p1) = {day1,p1,1688,{0.184,ms}}.

{Day, Part, Answer, Runtime} = aoc:solve(day1, p1),
Day = day1,
Part = p1,
Answer = 1688,
Runtime = {0.184,ms}.

To develop with an open REPL call r3:compile() from within the REPL to reload code with updates from your editor.

% Reload code and re-run all solutions
r3:compile(), aoc:solve_all().

aoc2021's People

Contributors

dmsnell avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.