Skip to main content

Timeline for Recursive DFS Problem

Current License: CC BY-SA 4.0

2 events
when toggle format what by license comment
Oct 1, 2022 at 2:51 comment added Stef Man I think I understand what you are saying. I already had an implementation similar to your BFS idea but I was using DFS with recursion and exploring all possible "depth-first" paths from [(0,0),(1,0),…,(m−1,0)] to [(0,n−1),(1,n−1),…,(m−1,n−1)] storing the min result given from each path. BFS makes a lot of sense here because we remove the need for recursion, and since we are exploring the "vertices" in a "breadth-wise" manner as opposed to "depth-wise", we are guaranteed that reaching the final vertex will be the minimum distance. It didn't even occur to me to use BFS, thank you!
Sep 30, 2022 at 16:04 history answered Matthew C CC BY-SA 4.0