Depth First Search to find shortest path?
问题 I know this is usually done with breadth first, but we are asked to do it with both, I already accomplished breadth first.... I feel like this is a pretty typical example of using a depth first search, so I was hoping I could get some help here... I am attempting to find the shortest path through a maze using depth first search, but as of right now I cannot wrap my head around how exactly to do it. This is my code so far: void maze::findPathRecursive(graph &g, int position, int goal) { if