Day 3 done. This one was pretty easy.
My part 1 solution mostly generalized to part 2, but I ended up having to rewrite the whole function anyway because I didn't make it flexible enough. For part 1 I initially just scanned for the max digit in the whole line except for the right-most digit, then found the max digit to the right of that.
For part 2, I effectively generalized it, but had to calculate how many digits I was allowed to find the max in, and loop over each number of digits I still needed to keep room for. A little fiddly, but not too hard at all. I'm kind of curious if doing it arithmetically using a bigint would be faster or slower. My gut says that it would probably be slower, and just save a little bit of memory.
#AdventOfCode #AdventOfCode2025 #AdventOfCode2025Day3 #AdventOfCode2025Day03 #Day3 #Day03 #Rust #RustLang #Programming #Coding



