This pull request adds a beginner-friendly implementation of Dijkstra's algorithm using C++ to the repository. The code is designed to be easy to understand, especially for those new to algorithms and data structures, by using fundamental structures and classes.
Details:
Language: C++ (using Turbo C for simplicity)
Approach: The code uses basic C++ constructs, such as structures and classes, to demonstrate how Dijkstra's algorithm works in finding the shortest path in a graph.
Graph Type: Supports both directed and undirected graphs.
Input: Takes user input for the graph's edges, weights, and source vertex.
Output: Displays the shortest path and distances from the source vertex to all other vertices.
Key Features:
Beginner-Friendly: Uses simple structures (struct) and classes (class) to keep the code accessible to beginners.
Interactive: Users can input graph details directly into the console.
Clear Output: Shows both the result set (shortest path distances) and the parent set (previous vertices in the shortest path).
[x] I have performed a self-review of my code
[x] My code follows the style guidelines of this project
[x] I have added tests that prove my fix is effective or that my feature works
[x] New and existing unit tests pass locally with my changes
[x] Comments in areas I changed are up to date
[x] I have added comments to hard-to-understand areas of my code
[x] I have made corresponding changes to the README.md
Description:
This pull request adds a beginner-friendly implementation of Dijkstra's algorithm using C++ to the repository. The code is designed to be easy to understand, especially for those new to algorithms and data structures, by using fundamental structures and classes.
Details: Language: C++ (using Turbo C for simplicity) Approach: The code uses basic C++ constructs, such as structures and classes, to demonstrate how Dijkstra's algorithm works in finding the shortest path in a graph. Graph Type: Supports both directed and undirected graphs. Input: Takes user input for the graph's edges, weights, and source vertex. Output: Displays the shortest path and distances from the source vertex to all other vertices.
Key Features: Beginner-Friendly: Uses simple structures (struct) and classes (class) to keep the code accessible to beginners. Interactive: Users can input graph details directly into the console. Clear Output: Shows both the result set (shortest path distances) and the parent set (previous vertices in the shortest path).