2025 Advent of Code Day 9 Part 2

Perl. Developed and tested with Perl 5.40.0. use v5 .40 ; my @input ; open DATA, q/data/ ; while ( <DATA> ){ chomp ; push @input , [ split /,/ , $_ ]; } close (DATA); my %seen ; my @x_coordinates = sort { $a <=> $b } grep { ! $seen { $_ } ++ } map { $_ -> [ 0 ] } @input ; %seen = (); my @y_coordinates = sort { $a <=> $b } grep { ! $seen { $_ } ++ } map { $_ -> [ 1 ] } @input ; my %coordinates_x ;…