DFS starts visiting vertices of a graph at an arbitrary vertex by
marking it as visited.
• It visits graph’s vertices by always moving away from last
visited vertex to an unvisited one, backtracks if no adjacent
unvisited vertex is available.
• It Is a recursive algorithm, it uses a stack.
• A vertex is pushed onto the stack when it’s reached for the first
time
• A vertex is popped off the stack when it becomes a dead end,
i.e., when there is no adjacent unvisited vertex
• “Redraws” graph in tree-like fashion