Advent of Code is an Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved in any programming language you like. People use them as a speed contest, interview prep, company training, university coursework, practice problems, or to challenge each other.
You don't need a computer science background to participate - just a little programming knowledge and some problem solving skills will get you pretty far. Nor do you need a fancy computer; every problem has a solution that completes in at most 15 seconds on ten-year-old hardware.
I will write my answers in plain Javascript as it's the quickest for me, but you can use the logic in every other languages!
I will not post the answer the same day as the puzzle is released because there's a leaderboard and people are competing for the best time. I will post the answer the day after the puzzle is released.
- Clone the repo
- Make sure you are running Node.js version
17.5
or more recent. - Go to the folder of the day you want to run
cd d[XX]
- Run
node d[XX].js
in the terminal to run the code for the day XX.
The answers are probably not the best nor the most efficient. These are the one I came up with without seeking for performance.
There are a lot of different ways to solve the problems so you should not take my answers as the only way to solve them.