Depth First Search or DFS in Graph
Depth-first search (DFS) is an algorithm for traversing or searching tree or graph data structures. The algorithm starts at the root node (selecting some arbitrary node as the root node in the case of a graph) and explores as far as possible along each branch before backtracking.
Time complexity: O(V + E), where V is the number of vertices and E is the number of edges in the graph.
Auxiliary Space: O(V + E), since an extra visited array of size V is required, And stack size for iterative call to DFS function.
Graph Data Structure Notes for GATE Exam [2024]
Graphs, a fundamental concept in computer science and mathematics, serve as powerful tools for modeling and solving a myriad of real-world problems. As aspirants gear up for the GATE Exam 2024, a comprehensive understanding of graph data structures becomes paramount. These notes aim to provide a concise and illuminating guide to graph data structures, unraveling the principles, representations, and algorithms associated with them, all of which are essential for mastering this topic in the GATE examination.
Table of Content
- What is Graph?
- Components of a Graph
- Breadth First Search or BFS in Graph
- Depth First Search or DFS in Graph
- Types of Graphs
- Representations of Graph
- Basic Properties of a Graph
- Applications of Graph Data Structure
- Advantages of Graph:
- Disadvantages of Graph
- Gate Previous Year Problems on Graph Data Structure
Contact Us