Top 10 Interview Questions on Depth First Search (DFS) Last Updated : 20 Nov, 2020 Improve Improve Like Article Like Save Share Report Depth-first search (DFS) is an algorithm for traversing or searching tree or graph data structures. One starts at the root (selecting some arbitrary node as the root in the case of a graph) and explores as far as possible along each branch before backtracking. Here are some important DFS problems asked in Technical Interviews: Find number of islands Transitive closure of a graph using DFS Application of DFS Detect cycle in an undirected graph Longest path between any pair of vertices Find a mother vertex in a graph Iterative Depth first traversal Print all path from a given source to a destination Stepping Number Maximum product of two non- intersecting paths in a tree All articles on Depth First Search Like Article Suggest improvement Previous TCS Digital Hiring Interview Experience 2018 Next Zoho Interview Experience | Set 21 (On-Campus) Share your thoughts in the comments Add Your Comment Please Login to comment...