Giter Club home page Giter Club logo

adventofcode-2023's Introduction

advent-of-code-2023 Examples MIT license

Advent of Code 2023 ๐ŸŽ„ solutions by @Aquaj

README is based on Jรฉrรฉmie Bonal's AoC Ruby template.

What is Advent of Code?

Advent of Code is an online event created by Eric Wastl. Each year, starting on Dec 1st, an advent calendar of small programming puzzles are unlocked once a day at midnight (EST/UTC-5). Developers of all skill sets are encouraged to solve them in any programming language they choose!

Advent of Code Story

Something is wrong with global snow production, and you've been selected to take a look. The Elves have even given you a map; on it, they've used stars to mark the top fifty locations that are likely to be having problems.

You've been doing this long enough to know that to restore snow operations, you need to check all fifty stars by December 25th.

These were not written as example of clean or efficient code but are simply my attempts at finding the answers to each day's puzzle as quickly as possible. Performance logging was added simply as a fun way to compare implementations with other competitors.

Puzzles

Day Part One Part Two Solutions
โœ” Day 1: Trebuchet?! ๐ŸŒŸ ๐ŸŒŸ Solution
โœ” Day 2: Cube Conundrum ๐ŸŒŸ ๐ŸŒŸ Solution
โœ” Day 3: Gear Ratios ๐ŸŒŸ ๐ŸŒŸ Solution
โœ” Day 4: Scratchcards ๐ŸŒŸ ๐ŸŒŸ Solution
โœ” Day 5: If You Give A Seed A Fertilizer ๐ŸŒŸ ๐ŸŒŸ Solution
โœ” Day 6: Wait for it ๐ŸŒŸ ๐ŸŒŸ Solution
Day 7: TBD Solution
Day 8: TBD Solution
Day 9: TBD Solution
Day 10: TBD Solution
Day 11: TBD Solution
Day 12: TBD Solution
Day 13: TBD Solution
Day 14: TBD Solution
Day 15: TBD Solution
Day 16: TBD Solution
Day 17: TBD Solution
Day 18: TBD Solution
Day 19: TBD Solution
Day 20: TBD Solution
Day 21: TBD Solution
Day 22: TBD Solution
Day 23: TBD Solution
Day 24: TBD Solution
Day 25: TBD Solution

Running the code

Run bundle install to install any dependencies.

Each day computes and displays the answers to both of the day questions and their computing time in ms. To run it type ruby day<number>.rb.

If the session cookie value is provided through the SESSION env variable (dotenv is available to provide it) โ€” it will fetch the input from the website and store it as a file under the inputs/ folder on its first run. Lack of a SESSION value will cause the code to raise an exception unless the input file (inputs/{number}) already present. The code will also raise if the input isn't available from AoC's website (404 error).

adventofcode-2023's People

Contributors

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