This repository collects all input files, solutions, template algorithms, data structures and other supporting information used to solve the Advent of code challenges in different years: 2022, 2023. A generic script was written to run tests and main problem for a given year, day and challenge.
Every solution can be called using the helper function designed to call any given challege (one or two) for a given day and year. Here is how it works:
python aoc.py year.day.challenge_number type
Where:
year
: the year of the challengeday
: the respective day of the challengechallenge_number
: the challenge number for the day, can be1
or2
type
: there are two types of calls,test
to call the test andmain
to execute the main challenge problem
For example:
python aoc.py 2022.1.1 test
This instruction will execute the test
problem of day 1
, challenge 1
of year 2022
.
One or more tests can be added and specified for each particular challenge at the main execution section of the challenge's file. For more information, explore the utils file, performTests
function.
Solved every challenge for the year 2023. The code has been categorized in three basic parts:
- parseInformation function
- the algorithm
- main function putting eveything together.
My goal this year was to solve Advent of Code 2023 using the new programming language Mojo. Initially I will explore the language basics: variables, data types, control flow, loops, functions, classes?/structs, ownership. In parallel I will be solving the Advent challenges. Normally the first ones are quite easy, scaling in complexity at around challenge 16 or so. We'll see how it goes this year.
You run mojo programs using mojo filename.mojo
Programs can be build using mojo build filaname.mojo
.
I solved every challenge for the year 2022. The code has been categorized in three basic parts:
- parseInformation function
- the algorithm
- main function putting eveything together.
I started learning the programming language Go. It is a typed, compiled programming language developed by Google. It was design with conconcurrency in mind. It is widely used in web development as a backend language and has a special place in the world of cloud computing.Its performance is superior to interpreted languages such as Python, Ruby or Javascript. First program of the AOC 2022 challenge was written in Go. More programs will be written in Go in the future.