The author is working on the Advent of Code 2024 Day 9 challenge, which involves a three-phase gauntlet. The first phase involves representing memory as a list, moving values from the end to the beginning, and calculating a checksum. The author has developed an algorithm to solve this phase, using a loop to create a disk representation and then moving values around. The algorithm checks for empty spaces and stops when it finds a certain number of contiguous empty spaces. The author has also calculated the checksum by extracting all values up to the first empty cell and summing the product of each value and its index. For Part 2, the author has developed a new strategy that involves tracking the sizes of file blocks and empty cells, and moving file blocks to empty spaces. The author has also coded a disk-printer to visualize the fragmentation process. The final step involves calculating a new checksum using a double-reduce method. The author has successfully solved both parts of the challenge and is moving on to Day 10.
dev.to
dev.to
Create attached notes ...
