Commit Graph

20 Commits

Author SHA1 Message Date
818e9478e1 Day 18 solution
ivec3 is a copy of ivec2 with a third dimension added and a few new utility methods (chiefly: MinElement, GetNeighbors, IsTouching).
2022-12-18 11:11:37 -06:00
09f866c9a3 Day 17 solution
This is very slow. There are lots of ways to optimize it, but I hate this problem so I probably won't come back to it. But maybe.
2022-12-17 01:55:17 -06:00
e14f71484f Day 15 solution
Pretty rough, this is my initial solve. Part 2 needs to be sped up, but is currently 3 seconds on my PC and my dataset.
2022-12-15 14:12:52 -06:00
b1d57f4fd0 Day 14 solution
This runs slower than I'd like, but I wanted to check my initial solution submitted so I can iterate on it later.
2022-12-14 17:42:23 -06:00
ba6ad54329 Day 13 solution
I am not completely happy with this data structure, but it's functional enough. I wanted to implement comparers and equality overrides for the classes to make part 2 shorter, but it would have come at the cost of a bunch of boilerplate code, so whatever.
2022-12-13 17:15:16 -06:00
2f73611a7c Day 12 solution
This is quite slow, at least for part 2 (and part 1 is slower than I want it to be, event parse takes longer than I thought it should). I need a better approach to the second part. Probably need to mark all nodes' distances from the goal point instead of one-by-one plotting a path from each possible start to the end, but that requires an adjustment to how I'm building the graph in the first place.
2022-12-12 17:13:02 -06:00
df362c0fd4 Day 11 solution
Prime number shenanigans...I do not like "cool math games"...
2022-12-11 10:25:12 -06:00
8aab7076fb Day 10 solution
Pretty happy with this solution. Took me longer to read and understand part 2 than I would have liked, but it's done, and pretty cleanly, too.
2022-12-10 09:25:07 -06:00
dd50a46ede Day 9 solution
This is ugly. I probably should've vec2'd this, made smarter move and follow logic that isn't a series of 'if's, and found a smarter way to calculate distance than my hackneyed vector distance, but it totally works so I'm rolling with it.
2022-12-08 23:38:01 -06:00
f9e75ffcad Minor restructure, .net update, add utilities 2022-12-08 22:59:46 -06:00
34783e647e Day 8 solution
I'm sure there's a cleaner way to search in four directions rather than manually running each loop like this, but I didn't want to mess with genericizing it just yet.
2022-12-08 10:31:32 -06:00
8f9b147913 Day 7 solution
Cleaned this one up a bit after getting the solve, and did a few things to make Rider quiet.
2022-12-06 23:49:59 -06:00
a3b906f94d Day 6 solution 2022-12-05 23:28:34 -06:00
b9161e4b42 Day 5 solution
A Deep Copy and a double-ended queue would have made this day much easier. I should add those. (Having trouble finding a generic deep copy that works in .net 6, though...I opted to rewrite my original List<List<char>> solution into List<string> in lieu of a deep copy so I wouldn't have to parse the input all over again.)
2022-12-04 23:46:24 -06:00
4b51ff9970 Day 4 solution 2022-12-04 00:47:34 -06:00
771a21b969 Day 3 solution
Took me a bit to remember how Aggregate worked, as it always does when I need it.
2022-12-03 08:57:51 -06:00
ff7633dc12 Day 2 solution
This is an ugly, kind-of-brute-force solution. I'm not proud of it, but it works and got me top 1000 on both parts.

I also changed the "which day to run if no day is specified" to just always choose the highest numbered day.
2022-12-01 23:14:45 -06:00
c1757500da Sample input for day 1 2022-12-01 08:48:36 -06:00
55f8a1806c Embed inputs as resources
This enables the binary to be invoked from anywhere and still run on the default input set, as well as being more portable/shareable which can help with performance comparisons between machines. Files are still supported if they exist.
2022-11-30 20:37:36 -06:00
23945154d4 Initial commit - framework 2022-11-30 17:19:53 -06:00