davepb05
davepb05
  • 15
  • 477
Advent of Code 2024 Day 15 (Part 1 only)
Solving day 15 of AoC in Go.
part 1 full + part 2 partial solution
I took a long time thinking about part2 so I stopped recording at some point; recursively I am looking for boxes which are stacked onto each other and then trying each box (part of a box) if it can be moved upwards. I wouldn't say this was very difficult as it was quite clear what you had to do and also that it was reasonably implementable but I still took my time; in this regard it reminded me of adventofcode.com/2023/day/10 . nice problem in any case :)
Cleaned up solution: github.com/atlas-editor/aoc/blob/main/2024/d15/x.go
Переглядів: 19

Відео

Advent of Code 2024 Day 14Advent of Code 2024 Day 14
Advent of Code 2024 Day 14
Переглядів 195 днів тому
Solving day 14 of AoC in Go part1 is simple a simulation and for part2 I went with the approach of finding out component sizes of robot clusters on the map, this approach yielded a correct result in the end but I struggled very long with an unfortunate bug: when looking for a tree and my component counter function returned that it did not find anything interesting I continued my loop search wit...
Advent of Code 2024 Day 13 (Part 2 in NumPy)Advent of Code 2024 Day 13 (Part 2 in NumPy)
Advent of Code 2024 Day 13 (Part 2 in NumPy)
Переглядів 246 днів тому
Solving day 13 of AoC in Go Python I knew this problem (it's basically: cses.fi/problemset/task/1754 ) but I still took very long to solve :( .. the problem can be formulated as a system of linear equation (only 2x2) but my implemented solution didn't work so I had to regress to python and use numpy to solve the equations. the cleaned up solution has a 2x2 linear equation solver Cleaned up solu...
Advent of Code 2024 Day 12 (Part 1 only)Advent of Code 2024 Day 12 (Part 1 only)
Advent of Code 2024 Day 12 (Part 1 only)
Переглядів 247 днів тому
Solving day 12 of AoC in Go. meager performance today; I couldn't finish part2 in the morning so on video I only solve part1 and then I spent a significant amount of time thinking of ways to solve part2, unfortunately without any success (I cut that part out). later I solved part2 by keeping track of all the edges that are part of the perimeter and then reduced this set by relating two edged if...
Advent of Code 2024 Day 11Advent of Code 2024 Day 11
Advent of Code 2024 Day 11
Переглядів 248 днів тому
Solving day 11 of AoC in Go. not too bad. in part1 I should've anticipated and prepared for part2 but I didn't, that way part2 would've taken a few seconds. nice problem though, reminds me of the problems: aoc 2021 day 14, aoc 2021 day 6, aoc 2015 day 19 and ec 2024 quest 11 Cleaned up solution: github.com/atlas-editor/aoc/blob/main/2024/d11/x.go
Advent of Code 2024 Day 10Advent of Code 2024 Day 10
Advent of Code 2024 Day 10
Переглядів 139 днів тому
Solving day 10 of AoC in Go. poor performance on my side. I needed to google the recursive dfs implementation because I couldn't think of it I also had an unfortunate bug with checking presence in my custom set (aka map[T]bool), I was checking if the value was present in the map not it's actual value being true or false. otherwise it is a pretty straightforward problem for bfs (part1) and findi...
Advent of Code 2024 Day 9Advent of Code 2024 Day 9
Advent of Code 2024 Day 9
Переглядів 15410 днів тому
Solving day 9 of AoC in Go. took longer than I'd like to, the solution is far from optimal but runs pretty quickly.. Cleaned up solution: github.com/atlas-editor/aoc/blob/main/2024/d09/x.go
Advent of Code 2024 Day 8Advent of Code 2024 Day 8
Advent of Code 2024 Day 8
Переглядів 5311 днів тому
Solving day 8 of AoC in Go. having a vector type with vector addition and scalar multiplication has come in handy yet again! Cleaned up solution: github.com/atlas-editor/aoc/blob/main/2024/d08/x.go
Advent of Code 2024 Day 7Advent of Code 2024 Day 7
Advent of Code 2024 Day 7
Переглядів 2912 днів тому
Solving day 6 of AoC in Go. pretty straightforward problem, just a simple recursive solution Cleaned up solution: github.com/atlas-editor/aoc/blob/main/2024/d07/x.go
Advent of Code 2024 Day 1Advent of Code 2024 Day 1
Advent of Code 2024 Day 1
Переглядів 1313 днів тому
Solving AoC puzzles in Go.
Advent of Code 2024 Day 2Advent of Code 2024 Day 2
Advent of Code 2024 Day 2
Переглядів 513 днів тому
Solving AoC puzzles in Go.
Advent of Code 2024 Day 3Advent of Code 2024 Day 3
Advent of Code 2024 Day 3
Переглядів 1013 днів тому
Solving AoC puzzles in Go.
Advent of Code 2024 Day 4Advent of Code 2024 Day 4
Advent of Code 2024 Day 4
Переглядів 1913 днів тому
Solving day 4 of AoC in Go. Cleaned up solution: github.com/atlas-editor/aoc/blob/main/2024/d04/x.go
Advent of Code 2024 Day 5Advent of Code 2024 Day 5
Advent of Code 2024 Day 5
Переглядів 2313 днів тому
Solving day 5 of AoC in Go. I just went for the naive solution, using a hashmap in part2 for rules should speed it up and part1 must have a nice solution using topsort, I couldn't think of it; might add it to github later. Cleaned up solution: github.com/atlas-editor/aoc/blob/main/2024/d05/x.go
Advent of Code 2024 Day 6Advent of Code 2024 Day 6
Advent of Code 2024 Day 6
Переглядів 5613 днів тому
Solving day 6 of AoC in Go. Again naive solution for part2, the only optimization is trying to put obstructions on places where the original path has gone. Cleaned up solution: github.com/atlas-editor/aoc/blob/main/2024/d06/x.go