Code Monkey home page Code Monkey logo

adventofcode-2023's Introduction

My solutions to the 2023 edition of Advent of Code.

Previous participations

Problem statements & solutions

In order to make the challenge more interesting, I set myself the following rules:

  • Pure: no usage of var or mutable datastructures
  • Self-contained: no third-party libraries, one file per day (*)
  • Efficient: optimal asymptotic complexity, as far as reasonable
  • Concise: readability is key

Note that these rules do not necessarily apply while solving a problem, but rather when committing the code to this repository.

(*): this rule could be subject to modification, for instance if the puzzles implicitly require it (Intcode in 2019).

Usage

This project runs on Scala 3.3.1 and sbt 1.9.7.

Use the following template to write a solution for a given day:

package adventofcode.solutions

import adventofcode.Definitions.*

@main def Day01 = Day(1) { (input, part) =>

  part(1) = ???

  part(2) = ???

}

(change 1 to the current day number and fill in the ???)

Paste your input as a file named 01.txt in input/.

To run the code, enter sbt run Day01.

The output(s) will be printed to the console and stored in output/ as 01-1.txt and 01-2.txt.

Additionally, the command sbt test will run all the implemented solutions and compare their result against the currently stored output, to detect any potential regression.

License

MIT

adventofcode-2023's People

Contributors

floriancassayre avatar

Stargazers

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