Made with Xcode 15 and Swift 5.9
Wanna give Advent Of Code using Swift a go? Try my Project Template
Trying to solve each puzzle each day. I hope I'll have enough time and motivation to do so.
All the puzzles will be solved using Swift.
No cheating. Many other persons do the puzzle each day. I'll have to come up with my own solution ... or skipping a day.
Some code may (and will!) be shared across days.
Not all special cases will always be treated by the code, so it may not work for any input.
Some special attention will be addressed regarding performances, I'll try to solve each day in less than a computing seconds!
Day | Computing time* | Part 1 | Part 2 |
---|---|---|---|
1 | 0,0096s | 54450 | 54265 |
2 | 0,0117s | 2776 | 68638 |
3 | 0,0080s | 530849 | 84900879 |
4 | 0,0389s | 28750 | 10212704 |
5 | 13,0136s | 3374647 | 6082852 |
6 | 0,0242s | 275724 | 37286485 |
7 | 0,0037s | 250946742 | 251824095 |
8 | 0,0198s | 19637 | 8811050362409 |
9 | 0,0019s | 1887980197 | 990 |
10 | 0,4138s | 6815 | 269 |
11 | 0,0168s | 9608724 | 904633799472 |
12 | 3,1991s | 7753 | 280382734828319 |
13 | 0,2648s | 30575 | 37478 |
14 | 0,9792s | 107142 | 104815 |
15 | 0,0059s | 497373 | 259356 |
16 | 0,9418s | 7415 | 7943 |
17 | 10,2375s | 916 | 1067 |
18 | 0,1146s | 40745 | 90111113594927 |
19 | N/A | 323625 | |
20 | 0,0544s | 711650489 | 219388737656593 |
* : Best elapsed time (after a few iterations) of the complete solution using "Release" mode on a MacBook Pro 14in 2021 with M1 Pro 10 CPU 16 GPU and 32GB of memory