added day24 solutions, one day left!

This commit is contained in:
alexchao26
2020-08-12 18:21:13 -04:00
parent 3a8cc549a5
commit 5902b1694c
4 changed files with 436 additions and 1 deletions
+2 -1
View File
@@ -28,5 +28,6 @@ Day | Name | Type of Algo & Notes
19 | Tractor Beam | - Another Intcode outputting to a 2D grid <br> - __THERE NEEDS TO BE A CONVENTION FOR X AND Y WHEN WORKING WITH 2D GRIDS__ This is awful, should it be mathematical? Should it represent rows and columns? Who knows?! <br> - Little geometry (drawing squares) for part2 but nothing crazy
20 | Donut Maze | __Breadth first search__ path finding algo. Dijkstra's Algorithm to find the shortest path given a maze with "portals." <br> Part 2 is kind of wild with the maze become 3D, but the solution is effectively the same, just more complex to implement <br> - I remapped this in my head to more of a 3D cube instead of a donut... <br> - That was really cool to get working... Dare I say fun...
21 | Springdroid Adventure | Another simple-ish Intcode based problem, this time using some weird __Assembly language__ that gets inputs via writing ASCII values to the Intcode computer.
22 | Slam Shuffle | - Seems fairly easy at first... But the part 2 has numbers somewhere in the 32-bit number to 64-bit number range... So the part 1 code is pretty much useless... <br> I gave up on part 2. It's some crazy linear algebra with modular inverses?.. Theoretically it makes some sense.. but I had to read someone else's solution for hours to kind of understand the implementation...
22 | Slam Shuffle | - Seems fairly easy at first... But the part 2 has numbers somewhere in the 32-bit number to 64-bit number range... So the part 1 code is pretty much useless... <br> I gave up on part 2. It's some crazy __linear algebra with modular inverses?..__ Theoretically it makes some sense.. but I had to read someone else's solution for hours to kind of understand the implementation...
23 | Category Six | Intcode computer NETWORK of 50 computers... <br> Oof that's a lot of stuff to coordinate, but not too hard, make a Network struct. <br> Part2 doesn't seem too different, but includes a NAT device, which is simple enough to just store in variables in the goroutine... <br> That has to be record time for me to finish a day :) Sigh of relief after day22.
24 | Planet of Discord | Almost done... When the input if 25 character you know it's going to be a crazy AoC day... <br> Part1 is fairly straightforward _2D slice traversal_. <br> Part2 makes it a recursive map... of course <br> I chose to utilize predefined-length arrays to minimize having to make lots of slices. If the number of minutes was not known ahead of time, then a doubly linked list could have worked to expand layers indefinitely. Or a map with int-indexes because those could be negative. <br> I wrote a lot of code to just handle recursive structures... There's probably a way to clean this up and I definitely didn't plan my approach well enough before writing code