Bu proje, aşağıdaki haritadan 2 şehir arasındaki en kısa mesafeyi hesaplamak için Dijkstra Algoritmasını kullanır. Gördüğünüz gibi, bir şehir yalnızca diğerine gidebilir ve yollar tek yönlüdür.
Kullanıcı kalkış şehrini ve varış şehrini seçer. İki şehir arasında geçerli bir yol varsa, algoritma rotayı ve toplam mesafeyi verir. Geçerli bir rota yoksa, algoritma bu bilgiyi verir ve onu tekrar çalıştırmak isteyip istemediğinizi sorar.
This project uses Dijkstra’s Algorithm in order to calculate shortest distance between 2 cities from the below map. As you can see, one city can only go to another one and roads are one directional.
User chooses the departure city and the destination city. If there is a valid way between two cities, algorithm gives the route and the total distance. If a valid route does not exist, algorith gives this info and asks whether if you'd like to run it again.