i'm sure tonight's AoC is gonna be some wicked evil shit i hope i can solve it before morning
1 Boost
0 Likes
do i handle this problem with an actual grid structure or do i do like a directed graph. these wire connections are all orthogonal so there can only be four connections, but how do i know where to place the lights in relation to each other, do i need to shift them, is this something i can do in one pass, or do i need two, or do i need a thousand. the example in the problem description is not very enlightening…
hmmmm…
lights that have two connections are guaranteed to be at the corners, lights that have three are guaranteed to be at the edges, and all the others are guaranteed to have four.
i think it doesn't matter which corner i place the corner lights on, right? i can just place them on a corner
what do you mean the middle of the grid man