Claude guided me through this extensively, but I wrote all this on my own in the end. Uses breadth first search (BFS). This is slow, but it produces the correct answer.
Claude guided me through this extensively, but I wrote all this on my own in the end. Uses breadth first search (BFS). This is slow, but it produces the correct answer.