DEV Community

MokhtarEbrahim
MokhtarEbrahim

Posted on

Depth First Search algorithm in Python (Multiple Examples)

1 Introduction
2 The Depth First Search Algorithm
3 Representing a graph
3.1 Adjacency Matrix
3.2 Adjacency List
4 Implementing Depth First Search(a non-recursive approach)
5 DFS using a recursive method
6 Depth First Search on a Binary Tree
6.1 What is a Binary Tree?
6.2 Representing Binary Trees using Python classes
6.3 Implementing DFS for a binary tree
7 Depth First Search using networkx
7.1 Constructing a graph in networkx
7.2 Visualizing the graph in DFS
7.3 Graph traversal in networkx – DFS
8 Topological sorting using Depth First Search
9 Finding connected components using DFS
10 Conclusion

https://likegeeks.com/depth-first-search-in-python/

Top comments (0)