Advent of Code 2025 - Day 9: Movie Theater
Day 9 was about finding the largest rectangle between red tiles on a theater floor. Part 1 was straightforward geometry. Part 2 required checking if rectangles fit inside a polygon - which is where I reached for an external library.
Part 1: Largest Rectangle Between Any Two Points
Given coordinates of red tiles, find the largest rectangle using any two red tiles as opposite corners.
This is pure geometry: for every pair of points, calculate the rectangle area and track the maximum.