Metro Navigation Program This program facilitates navigation through a metro system by utilizing a graph-based data structure. To execute the program, simply run the code on any Integrated Development Environment (IDE) with C extensions installed.
Overview The core data structure employed in this program is a graph, which models the interconnected metro stations and their relationships. The objective is to determine the shortest route between two specified locations, considering either distance or cost as the optimization criteria.
Getting Started Installation:
Ensure that your IDE supports C extensions. Clone or download the repository to your local machine. Execution:
Open the project in your preferred IDE. Run the code to initiate the program. Usage Input:
The program begins by loading a sample metro map containing pre-established stations and connections. Dijkstra's Algorithm:
The implemented Dijkstra's algorithm is then employed to compute the shortest route between the specified source and destination stations. User Interaction:
Upon running the code, a display of available stations along with their unique identifiers (IDs) will be presented. The user is prompted to select their origin and destination stations. Travel Preferences:
Choose the preferred optimization metric: either distance or cost. Results:
The program will output the shortest route information based on the selected criteria, providing details such as stations traversed and the overall journey.