Advent of Code 2023 solutions.
Go to file
2024-01-27 00:21:07 -05:00
.gitignore Clean up day 25 and add explanation. 2024-01-25 21:50:21 -05:00
d1.py Do day 1. 2023-12-01 22:51:14 -05:00
d2.py Do day 2. 2023-12-02 11:48:32 -05:00
d3.py Improve lib and use it to solve 3 and 17. 2023-12-17 23:57:55 -05:00
d4.py Do days 5 and 6. 2023-12-06 11:47:04 -05:00
d5.py Do days 5 and 6. 2023-12-06 11:47:04 -05:00
d6.py Do days 5 and 6. 2023-12-06 11:47:04 -05:00
d7.py Do day 7. 2023-12-07 23:57:38 -05:00
d8.py Do day 8 and add gcm and prime factors to lib. 2023-12-08 00:32:03 -05:00
d9.py Make everything work again. 2023-12-27 21:53:08 -05:00
d10.py Solve 10 and 11. 2023-12-15 18:20:31 -05:00
d11.py Solve 10 and 11. 2023-12-15 18:20:31 -05:00
d12.py Make everything work again. 2023-12-27 21:53:08 -05:00
d13.py Do day 13 and add cleaner solution to day 18. 2023-12-24 11:51:31 -05:00
d14.py Do day 14. 2023-12-24 13:27:48 -05:00
d15.py Do day 15. 2023-12-25 10:41:47 -05:00
d16.py Solve day 16. 2023-12-16 00:32:59 -05:00
d17.py Improve lib and use it to solve 3 and 17. 2023-12-17 23:57:55 -05:00
d18.py Do day 13 and add cleaner solution to day 18. 2023-12-24 11:51:31 -05:00
d19.py Make everything work again. 2023-12-27 21:53:08 -05:00
d20.py Make everything work again. 2023-12-27 21:53:08 -05:00
d21.py Finish day 21 part 2 not super hands free but I take it. 2024-01-27 00:21:07 -05:00
d22.py Do day 20. 2023-12-27 18:30:04 -05:00
d23.py Solve day 23. 2024-01-17 20:20:41 -05:00
d24.py Solve day 24. 2024-01-23 19:53:32 -05:00
d25.py Clean up day 25 and add explanation. 2024-01-25 21:50:21 -05:00
dx.py Commit shared files to aoc py meta repo. 2023-12-27 21:42:58 -05:00
get.py Commit shared files to aoc py meta repo. 2023-12-27 21:42:58 -05:00
lib.py Commit shared files to aoc py meta repo. 2023-12-27 21:42:58 -05:00
LICENSE Add license. 2023-12-02 11:52:06 -05:00
monitor.py Commit shared files to aoc py meta repo. 2023-12-27 21:42:58 -05:00
README.md Solve day 25. Only d21 part 2 left o.O 2024-01-23 20:23:47 -05:00

My solutions to the Advent of Code 2023 programming challenges.

Thanks to Eric Wastl for creating this enjoyable event.

  • Requires lib.py from aocpy repository.
  • Requires sympy for day 24.
  • Requires matplotlib and networkx for hands-on day 25.

Times

  • Day 1: 40:00 (I don't know what I am doing.)
  • Day 2: 14:15 (Okay, but far way from leaderboard.)
  • Day 3: 1st 20:00, 2nd 70:00... (I had a logic error that took me a while to find.)
  • Day 4: 1st 9:06, 2nd 22:31; it wasn't hard but I didn't think quick enough :/
  • Day 5: 1st 25:00, 2nd 1:55:00; Required patience and accuracy
  • Day 6: 13:54; I was slow because I thought it is much harder?
  • Day 7: 75:00; leaderboard 16:00... that was just bad; no excuse
  • Day 8: 25:00; I was doing pretty decent here.
  • Day 9: 57:00; my input parse function did not consider negative values...
  • Day 10: 180:00; this one was hard for me.
  • Day 11: 68:00; okay but not elegant and way too slow ofc; x-ray solution would have been neat
  • Day 12: 52:00 and 22:00 for leaderboard; had the right idea and I am good at this type of problem
  • Day 13: 90:00; pretty straightforward but way too slow
  • Day 14: 5:55 for first and then 48:00; straightforward but slow, ofc
  • Day 15: 4:30 and 31:20; more reading comprehension than programming
  • Day 16: 00:27:30 745; best placement so far, of course still horribly slow
  • Day 17: a couple of hours; I realized that I need A* after a while; reused implementation from Project Euler but improved with heapq which was super fun
  • Day 18: a couple of hours; I realized that I need shoelace algo for part two but didn't realize that I have to compute the outer edges for a while and after I did, I still got clockwise/counter-clockwise issues. They could have made it meaner by using different clock directions for example and input.
  • Day 19: This one was pretty straightforward and required the interval technique we applied earlier.
  • Day 20: Part 2 was tough. I had the right idea of printing out the periods of the input conjunction gate pretty early, but then messed up the implementation and thought it wasn't gonna work. Spent a half day thinking up something else before returning to the idea and it worked flawlessly.
  • Day 21: Part 1 was straightforward, but part 2 maybe the hardest problem this year.
  • Day 22: Not too hard, but definitely way too slow for leaderboard.
  • Day 23: I found this fun because it required some creativity for part 2. Slow af, of course.
  • Day 24: Solve problem with sympy. I first used numpy to solve part 1 and it was much faster than using sympy, but I lost that solution when switching to sympy. Takes about three minutes to run for part 1 and then part 2 is under a second.
  • Day 25: I cheeky solved this by plotting the graph and manually removing the nodes. I should probably try to write an algorith that does that, but meh. Manually plotting requires matplotlib and networkx packages.