16
The official awful.systems Advent of Code 2023 thread
(awful.systems)
a community for posting cool tech news you don’t want to sneer at
non-awfulness of tech is not required or else we wouldn’t have any posts
discussion
In retrospect that would have been far better for runtime, my dist function ended up being a tad expensive.I substituted the rows/columns, with multiplication by the expansion rate if they were all numbers. And then for each galaxy pair do a running sum by going “down” the “right” and adding the distance for each row and column crossed.
https://github.com/zogwarg/advent-of-code/blob/main/2023/jq/11-b.jq
transpose
is nice to have in that approach.