GithubHelp home page GithubHelp logo

adventofcode2020's Introduction

This repository contains solutions to various puzzles of the Advent of Code 2020. Puzzles are solved with various idioms and libraries from the Scala ecosystem.

Ammonite is used to run the code. It is available from many package managers (e.g. brew install ammonite-repl). When running a puzzle solution (e.g. amm day2.sc) dependencies will be downloaded automatically. Probably will register any assertions in the code and will print a summary:

┌─────┬────────┬──────────────────────────────────────────────┬───────┬───────┐
│     │ Hash   │ Test                                         │ Time  │ Debug │
├─────┼────────┼──────────────────────────────────────────────┼───────┼───────┤
│  ✓  │ 71d872 │ valid paswords by the first validation rule  │ 0.046 │       │
│  ✓  │ baa61a │ valid paswords by the second validation rule │ 0.001 │       │
└─────┴────────┴──────────────────────────────────────────────┴───────┴───────┘
Passed: 2   Failed: 0   Total: 2

 ✓  Pass                               ✗  Fail
 ?  Throws in check                    !  Throws in body
 ±  Fails sometimes                    #  Suite partially fails

List of solutions and Scala idioms/libraries used:

Puzzle Idioms and libraries
Day 1 Ammonite Ops, set operations
Day 2 Regex pattern matching
Day 3 For Comprehensions
Day 4 Akka Streams, Match on interpolator
Day 5 Parsing text to integers
Day 6 fs2, semigroup
Day 7 scala-graph
Day 8 var, Mutable Collections
Day 9 Collections Sliding Window, Tails
Day 10 Collections Sliding Window
Day 11 Try, Success, Failure
Day 12 fs2, LazyList
Day 13 minBy
Day 14 fs2
Day 15 fs2
Day 16

adventofcode2020's People

Contributors

2m avatar

Stargazers

 avatar  avatar

Watchers

 avatar  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.