ProAlgos / ProAlgos-Cpp

C++ implementations of well-known (and some rare) algorithms, while following good software development practices
MIT License
507 stars 363 forks source link

Depth First Search #403

Closed dcyrus closed 3 years ago

dcyrus commented 3 years ago

Depth First Search Iterative Implementation using Stack

The DFS algorithm is a recursive algorithm that uses the idea of backtracking. It involves exhaustive searches of all the nodes by going ahead, if possible, else by backtracking.

Time Complexity: O(V+E) Space Complexity: O(V) *Where V represents vertices and E represent edges

stale[bot] commented 3 years ago

This issue has been automatically marked as inactive because it has not had recent activity. It will be closed in 15 days if no further activity occurs. Thank you for your contributions.