Skip to content

Minahil-Abid/PathwayNavigator-DijkstraAlgorithm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PathwayNavigator: Smart Route Assistance (C++)

PathwayNavigator is a C++ console-based application that helps users find the shortest or most cost-effective routes between major Romanian cities using Dijkstra’s Algorithm. Designed for both learners and enthusiasts, it combines real-world mapping with efficient algorithms to offer an interactive experience in route optimization.


Features

  • Find the shortest route based on distance
  • Find the cheapest route based on cost
  • Built-in list of 20 Romanian cities
  • Fully bidirectional graph connections
  • City list viewer for input help
  • Efficient Dijkstra's implementation with STL
  • Interactive CLI for user-friendly operation

How It Works

  1. Two separate graphs are built on startup:
    • One for distance
    • One for cost (e.g., fuel or travel time)
  2. User selects an option:
    • Show city list
    • Find route based on distance or cost
  3. Dijkstra’s Algorithm is applied to calculate:
    • The optimal route
    • Total travel distance or cost

Technologies Used

  • Language: C++
  • Data Structures: Vectors, Priority Queue, Adjacency List
  • Algorithm: Dijkstra's Shortest Path
  • Interface: Command-line based

Example Run

1. Show list of available cities
2. Find shortest path based on distance
3. Find cheapest path based on cost
4. Exit
Enter your choice: 2
Enter source city: Arad
Enter destination city: Bucharest

Shortest path from Arad to Bucharest:
Arad -> Sibiu -> Rimnicu Vilcea -> Pitesti -> Bucharest
Total cost: 418
Ready to roll. Go now!

Use Cases

  • Visualizing Dijkstra’s algorithm on real-city data
  • Mini project for academic submission
  • Graph theory and STL-based C++ practice
  • Interactive transport or route simulation
  • Creating a CLI-based smart route planner

Graph Map

Below is the visual representation of the cities and their connections:

Graph Image

Releases

No releases published

Packages

No packages published

Languages