geeksforgeeks
  • Tutorials
  • Courses
Data Structure
Java
Python
HTML
Interview Preparation
  • DSA
  • Practice Problems
  • C
  • C++
  • Java
  • Python
  • JavaScript
  • Data Science
  • Machine Learning
  • Courses
  • Linux
  • DevOps
  • SQL
  • Web Development
  • System Design
  • Aptitude
  • GfG Premium
Videos
January 10, 2025 |16.6K Views

Applications of Depth First Search

Graph, graph, DFS
 Save  Share  2 Likes
Description
Discussion

Depth-first search (DFS) is an algorithm (or technique) for traversing a graph.

Following are the problems that use DFS as a building block.  

1) Detecting cycle in a graph 
A graph has cycle if and only if we see a back edge during DFS. So we can run DFS for the graph and check for back edges. (See this for details)

Applications of Depth First Search: https://www.geeksforgeeks.org/applications-of-depth-first-search/

 

Recommendations
Video Thumbnail
22:26
Video Thumbnail
56.2K Views | 09/01/2025...
Kosaraju's Algorithm - Strongly Connected Components
Video Thumbnail
03:30
Video Thumbnail
12.8K Views | 09/01/2025...
Applications of Breadth First Traversal
Video Thumbnail
10:14
Video Thumbnail
29.5K Views | 08/01/2025...
Detect Cycle in a Directed graph using colors
Video Thumbnail
19:14
Video Thumbnail
148.3K Views | 22/10/2024...
Kruskal’s Algorithm for Minimum Spanning Tree
Video Thumbnail
17:41
Video Thumbnail
11.4K Views | 22/10/2024...
Implementation of Prims Algorithm
Video Thumbnail
05:37
Video Thumbnail
12.2K Views | 24/09/2024...
What is Bipartite Graph?
Video Thumbnail
07:23
Video Thumbnail
950 Views | 16/07/2024...
Sum of dependencies in a graph
Video Thumbnail
32:01
Video Thumbnail
3.9K Views | 01/04/2024...
Graph Practice Problems | Graph Data Structure | DSA Course
Video Thumbnail
05:02
Video Thumbnail
270 Views | 04/07/2022...
Remove all outgoing edges except edge with minimum weight
Video Thumbnail
13:58
Video Thumbnail
17.6K Views | 28/06/2022...
Stable Marriage Problem
GeeksforGeeks
location
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
location
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play StoreGFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy