Giter Site home page Giter Site logo

advent-of-code-2016's Introduction

2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021

Here lies my solutions to Advent of Code 2016, an Advent calendar full of programming puzzles from December 1st all the way to Christmas.

Inputs and Outputs

All inputs are read from inputs\inputXX.txt, with XX being the zero-padded day. As per the creator's request, they are not available in this repository and should be downloaded directly from the event website.

The only outputs for all days are exactly what should be pasted in the puzzle answer textbox, followed by the total runtime of both parts combined (via Python's time.time()), no more and no less. The only exception is when the answer is drawn on a grid-like formation, then that is printed instead of OCR. In some cases, helpful debugging code or other verbose messages are simply commented out, and can be manually toggled to better understand the code inner workings.

Implementation Goals

The solutions posted here are cleaned-up versions of the actual code written when aiming for the leaderboards. For all solutions, the main implementation goals were, in descending order:

  • Readability: Clean, readable, self-explanatory and commented code above all else.
  • Input Generalization: Should work not only for my input but for anyone's, with some assumptions made about it, which are noted when appropriate.
  • Modularity: Avoid duplicate code where possible, allowing for easy modification by making heavy use of classes and functions.
  • Speed: Use efficient algorithms, keeping runtime reasonably low without extreme micro-optimizations.
  • Minimal Imports: Refrain from imports besides utilities (sys, time) and basic standard libraries (math, itertools, collections). When the knowledge of functions and structures are considered vital to the problem solution (graphs, trees, linked lists, union-find, etc.), reimplement them.

Thanks!

Many thanks to Eric Wastl, who creates Advent of Code, as well as to the amazing community over at /r/adventofcode!

advent-of-code-2016's People

Contributors

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