This project focuses on finding the shortest path in unweighted graphs using fundamental concepts from Data Structures and Algorithms (DSA). The goal is to implement and understand various algorithms that can efficiently compute the shortest path between two nodes in a graph where all edges have equal weight.
In graph theory, the shortest path problem involves finding the shortest path between two vertices in a graph. In the case of unweighted graphs, where all edges have the same weight, several algorithms can be applied to efficiently compute the shortest path.
This project explores the implementation of such algorithms using key DSA concepts, providing a foundation for understanding and applying these techniques in real-world scenarios.
Breadth-First Search (BFS) is a graph traversal algorithm that explores all the vertices at the current depth prior to moving on to the vertices at the next depth level. In the context of unweighted graphs, BFS can be used to find the shortest path between two nodes.
To run the code in this project, you'll need:
- [Programming Language Compiler/Interpreter] - C++ complier
- [Any additional dependencies] - None
Follow these steps to use the project:
- Clone the repository:
git clone https://github.com/http-hamad/Shortest-path-of-unweighted-graphs-using-DSA-concepts
- Navigate to the project directory:
cd shortest-path-dsa
- Compile/Run the code:
[compile_command] [filename]
or[run_command] [filename]
- Follow on-screen instructions to input the graph and desired nodes for finding the shortest path.
Here's a simple example demonstrating how to use the project:
$ git clone https://github.com/http-hamad/Shortest-path-of-unweighted-graphs-using-DSA-concepts
$ cd shortest-path-dsa
$ g++ -o j Shortest-path-of-unweighted-graphs-using-DSA-concepts
$ ./j