# DFS Famous Top 25 Questions

1 min readMay 13, 2021

--

- Depth First Search (DFS) Implementation
- Generate list of possible words from a character matrix
- Find length of the longest path in the matrix with consecutive characters
- Replace all occurrences of 0 that are surrounded by 1 in a binary matrix
- Replace all occurrences of 0 that are not surrounded by 1 in a binary matrix
- Find all occurrences of a given string in a character matrix
- Flood Fill Algorithm
- Traverse given directory using BFS and DFS in Java
- Types of edges involved in DFS and relation between them
- Find the longest path in a Directed Acyclic Graph (DAG)
- Find the path between given vertices in a directed graph
- Determine if a graph is Bipartite Graph using DFS
- Check if a graph is strongly connected or not using one DFS Traversal
- Find cost of the shortest path in DAG using one pass of Bellman-Ford
- Check if a given graph is strongly connected or not
- Check if given digraph is a DAG (Directed Acyclic Graph) or not
- 2-Edge Connectivity in a Graph
- Determine if an undirected graph is a Tree (Acyclic Connected Graph)
- Check if an undirected graph contains cycle or not
- Transitive Closure of a Graph
- Topological Sort Algorithm for DAG using DFS
- Find the first k maximum occurring words in a given set of strings
- Find the maximum occurring word in a given set of strings
- Lexicographic sorting of given set of keys
- Inorder, Preorder and Postorder Tree Traversal