These are my solutions in JavaScript of the Advent of Code in 2023. Have a wonderful christmas! πππ
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.
To get my solutions, just run following commands:
npm install
npm run start
If you want to run a single day or a single puzzle. In this example I want to see the solutions of day 1:
npm run day <day> <puzzle> <performance>
#Examples
npm run day 2 #Runs Day2 with both puzzles
npm run day 2 1 #Runs Day2 Puzzle1
npm run day 2 1 true #Runs Day2 Puzzle1 and logs the time in ms
Day | Puzzle 1 (time) | Puzzle 2 (time) |
---|---|---|
1 - Trebuchet?! | βοΈ (~2ms) | βοΈ (~6.8ms) |
2 - Cube Conundrum | βοΈ (~1.4ms) | βοΈ (~1.4ms) |
3 - Gear Ratios | βοΈ (~1ms) | βοΈ (~14ms) |
4 - Scratchcards | βοΈ (~3.4ms) | βοΈ (~2.9ms) |
5 - If You Give A Seed A Fertilizer | βοΈ (~1.1ms) | |
6 - Wait For It | βοΈ (~0.4ms) | βοΈ (~0.4ms) |
7 - Camel Cards | βοΈ (~8.9ms) | βοΈ (~9.2ms) |
8 - Haunted Wasteland | βοΈ (~5.4ms) | βοΈ (~9.6ms) |
9 - Mirage Maintenance | βοΈ (~13.2ms) | βοΈ (~11.8ms) |
10 | ||
11 | ||
12 | ||
13 | ||
14 | ||
15 | ||
16 | ||
17 | ||
18 | ||
19 | ||
20 | ||
21 | ||
22 | ||
23 | ||
24 | ||
25 |
For this project I am using the MIT license