Don't Fence Me In
This problem gives us a a map with walls and open spaces aligned on a horizontal grid (45 degrees offset from cardinal directions), and asks how many "walls" we must remove to connect all the spaces to the outside of the map.
If this were a generic graph, we could consider each space a node, and each space which abuts the side of the maze as connected to a "source" node. If we consider knocking down a wall as adding an edge between the nodes that represent the spaces, we can see that it takes exactly one extra edge per space to connect them all (excluding any which are not already connected to the "source").
If this were a maze with walls aligned in cardinal directions, we would flood fill each space to identify the maximum extent of each space, and for those which are not connected to the outside, we would count (as per the above intuition) as needing to knock down a wall to connect.
This is, however, a diagonal maze, which adds significant complication. Fortunately, the problem throws us an "odd" bone, defining even and odd squares that determine which squares can have forward and backward slashes. This is critically important. Lets say we define an "odd" square as a square whose x and y coordinates sum to an odd number, and otherwise even. In any maze we see that dots which are in a cardinal direction must always be connected. Additionally, we can see that for a given maze, odd squares which are up-right and down-left will be connected (i.e. we cannot put a wall between them), and even squares which are up-left and down-right will be connected. In mazes of the OTHER parity, the directions are reversed. Once we add this additional "diagonal" logic to our BFS, we can sufficiently flood-fill spaces, same as with the above "cardinal direction" case.
There is one further complication, which is the "diamond" shaped spaces which contain no dot. We can special case these and count them before we do anything else. All other spaces must contain a dot, and we can iterate through the maze and flood-fill any time we find a dot.