Top 10 Interview Questions on Depth First Search (DFS) Last Updated : 23 Jul, 2025 Comments Improve Suggest changes Like Article Like 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 islandsTransitive closure of a graph using DFSApplication of DFSDetect cycle in an undirected graphLongest path between any pair of verticesFind a mother vertex in a graphIterative Depth first traversalPrint all path from a given source to a destinationStepping NumberMaximum product of two non- intersecting paths in a tree All articles on Depth First Search Comment More infoAdvertise with us Next Article Vizury Interview Experience | Set 2 (1.5 Years Experienced) K kartik Improve Article Tags : Graph DSA interview-preparation placement preparation DFS Interview-Questions +2 More Practice Tags : DFSGraph Similar Reads DE Shaw Interview Questions Navigate the world of DE Shaw & Co., a renowned global investment and technology development firm headquartered in New York City. Since its founding, DE Shaw, which specializes in a range of financial services such as hedge funds, private equity, and proprietary trading, has been a trailblazer i 4 min read Salesforce Technical Interview Questions Salesforce is one of the leading Customer Relationship Management (CRM) platforms in the world, renowned for its robust features, scalability, and extensive ecosystem. Salesforce is widely adopted by top companies such as Coca-Cola, Amazon Web Services, Toyota, L'Oréal, and many more because of its 5 min read OYO Interview Experience | Set 10 (On-campus for SDE) OYO visited our campus recently. Round 1: There was an online test having 20 Technical MCQs and 2 coding questions. 35 candidates were shortlisted for the interviews. Round 2: It started with the famous "Walk me through your resume", followed by two coding questions and a minor discussion on my proj 2 min read PayPal Interview Experience for SDE II PayPal Interview ExperienceRound 1(Data Structures & Algorithms): Self Introduction (5 min)After that, they asked the belowFind the element that occurs more than once(https://www.geeksforgeeks.org/dsa/array-elements-that-appear-more-than-once/)Find all elements that appear more than n/k times in 2 min read Vizury Interview Experience | Set 2 (1.5 Years Experienced) Vizury I got contacted by a recruiter on LinkedIn for Bangalore location. Telephonic round (DS and Algorithms) (1 Hour): 1) Print the level order traversal in reverse. https://www.geeksforgeeks.org/dsa/reverse-level-order-traversal/ I gave Stack and Queue Solution. Then he asked if I can think in te 1 min read Vizury Interview Experience | Set 2 (1.5 Years Experienced) Vizury I got contacted by a recruiter on LinkedIn for Bangalore location. Telephonic round (DS and Algorithms) (1 Hour): 1) Print the level order traversal in reverse. https://www.geeksforgeeks.org/dsa/reverse-level-order-traversal/ I gave Stack and Queue Solution. Then he asked if I can think in te 1 min read Like