The description of the labyrinth made of matrix is attached.
And my question is, How can we get the number of sets of cul-de-sacs?
I've try DFS, but I don't know how to mark a path if it is a cul-de-sac
Here's the description of cul-de-sac:
the number of accessible cul-de-sacs (a cul-de-sac is a maximal set S of connected inner points that can all be accessed from the same gate g and such that for all points p in S, if p has been accessed from g for the first time, then either p is in a dead end or moving on without ever getting back
leads into a dead end)