TheAlgorithms / C-Sharp

All algorithms implemented in C#.
GNU General Public License v3.0
7.12k stars 1.52k forks source link

Add Beginner-Friendly Dijkstra's Algorithm Implementation in C++ #468

Closed Jaydeeprawat17 closed 2 months ago

Jaydeeprawat17 commented 2 months ago

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).

siriak commented 2 months ago

This is a C# repository and you are sending C++ code