0% found this document useful (0 votes)
31 views8 pages

Graph Traversal Algorithms Explained

The document provides an overview of graphs as non-linear data structures composed of nodes and edges, along with their representation methods such as adjacency matrix and adjacency list. It explains two graph traversal algorithms: Depth First Search, which uses a stack to explore one branch at a time, and Breadth First Search, which uses queues to explore all active branches simultaneously. The content is structured with a table of contents and concludes with a thank you note.

Uploaded by

alliance2443
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views8 pages

Graph Traversal Algorithms Explained

The document provides an overview of graphs as non-linear data structures composed of nodes and edges, along with their representation methods such as adjacency matrix and adjacency list. It explains two graph traversal algorithms: Depth First Search, which uses a stack to explore one branch at a time, and Breadth First Search, which uses queues to explore all active branches simultaneously. The content is structured with a table of contents and concludes with a thank you note.

Uploaded by

alliance2443
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

BY

HARSHITA RAWAT
TABLE OF CONTENT
• Depth First Search
• Breadth First Search
Graphs
• Graphs are non-linear data structures consisting of nodes and edges.
• Often the information is stored in the nodes and
relationship/connection between nodes is represented by edges.
Representation of Graphs
Graphs are often represented by :

• Adjacency matrix
• Adjacency list
Depth First Search Algorithm
• Searching depth first
• Uses Stack to represent the next visiting state
• Visit nodes in one branch first and then go to other branches
Breadth First Search Algorithm
• Search breadth first
• Uses queues to represent the next visiting state
• Simultaneously visit nodes in each active branch
THANK YOU

You might also like