May 14, 2024
DFS?
I have always struggled with Depth First Search, DFS. I now have started solving it using first principles and it has started to make sense.
DFS can be solved using two methods:
Recursive solution Iterative solution, using stacks To solve recursively we must keep few things in our mind:
read more