Day 9: 'A heat wave in the West End: the ornamental water in Trafalgar Square is not officially a public bath, but children who paddle there are smiled on by the authorities.' An Advent Calendar of London a century ago, from 'Wonderful London', 1925, 📷Donald Macleish. #AdventLondon100 #Day09

Day 9 done.

This one was really hard for me. Part 1 wasn't bad at all; I could basically use the entirety of what I did yesterday for it.

Part 2 was really hard. At first, I tried actually building a HashSet of all the red and green tiles, and then a HashSet of all the areas for each pair, and checking them against each other. Needless to say, that wouldn't work. Building the tile HashSet alone would have eaten up more memory than I have on my computer, and I should have realized that immediately looking at my answer to part 1 (which was an area of over 4 billion tiles). I thought that checking a line of green tiles through the area wouldn't necessarily work, because a malicious input could make that not work (two immediate right or left turns could make a pair of adjacent green tile lines that would still work), but it turns out that it works fine for my input. Probably all inputs.

It works. I don't feel totally satisfied with the solution, but it works.

I think a more robust solution could be to trace the outline and fill it with square area units, then for each area to test (ordered from largest to smallest), repeatedly cut area out of it with the green tile squares. If all overlapping areas are tested and there are still un-cut squares, the area is invalid; move on to the next. If the area is cut completely to nothing, then it is the best area. I'm not going to implement this, because it sounds like a total fiddly pain, but I would be interested in seeing somebody else's solution along these lines.

#AdventOfCode #AdventOfCode2025 #AdventOfCode2025Day9 #AdventOfCode2025Day09 #Day9 #Day09 #Rust #RustLang #Programming #CodingChallenges

2025/src/bin/day09.rs at main

2025

AxFive

Choose 20 books that have stayed with you or influenced you. One book per day for 20 days, in no particular order. No explanations, no reviews, just covers. ❤️📚

­#BookSky #Books #BookChallenge #Day09
https://yadl.info/en/notes/2024/book-challenge-day-09

Book Challenge - Day 09 - YADL

Mark Schmeiser

#AdventOfCode #AoC

I completed #Day09 of #AdventOfCode2023.

Part 1:
- Difficulty: 1/10
- Workout: 1/10

Part 2:
- Difficulty: 0/10
- Workout: 1/10

This one was too easy, done in half a hour! 2-dimension array to hold all difference sequences (including the original sequence, at index 0). No need to get to the all-zeros level, the one just above (all values are equal) is enough. Attention to index fiddling. That's it.

Since I still got time, I refactored the program to make it presentable. It's in the next post in this thread. Done in almost one hour.

#AdventOfCode #AoC

I completed #Day09 of #AdventOfCode2015, just for the fun of it.

Part 1:
- Difficulty: 2/10
- Workout: 3/10

Part 2:
- Difficulty: 0/10
- Workout: 0/10

At first, I thought that the problem would require graph traversing for the shortest path; not so. Checking on people's AoC archives from 2015, I found that part 2 is trivial from part 1 (change min to max). So, for 7 cities, no graph needed; brute force is enough to generate all 7! = 5040 paths, then calculate their lengths.

The workout in part 1 is due to me finding, and trying to implement, Dijkstra's algorithm, and writing a permutation function (to my surprise, i wrote it almost from memory, and it works!)

Went for a walk around the Oudegracht while D was having Spanish class. I did not want to, & of course I felt better once I was actually going, but ugh. Motivation is hard. I took quite a few photos along the way & I really like this one for some reason. Not sure what the custom of putting them on the wall in front of your house is all about, but I saw three houses on one street with pairs hung up like this. #Day09 #365happydays2023 #walking #wandeling #clogs #klompen #utrecht #photography

#MoveIt2020 #Day09 #ywaHome session07

ok, there was not that much balance at some of the poses, but in general i'm okay with todays session. it was not so hard to start today as most of the other days for me, that was good..