Create exercise to implement Dijkstra algorithm #5
Description
Create new exercise called dijkstra-algorithm
. Provide detailed description of the task and provide complete solution.
The main part of the exercise is to implement the algorithm. However it also requires some knowledge in OO design, and experience with text files.
You are going to implement some logic that will read data form the text file using some special format. Input data should contain the distances between vertices. Once the program loaded input data, it can compute the shortest paths using Dijkstra algorithm. It's up to you how to design and implement it.
A client of your implementation should be able to easily get a shortest path between two vertices (including distance, and the list of vertices on the route) .
Please note, that you should think how to separate the algorithm, so the code can be reused in the future for building other applications. E.g. website that allows to find the shortest path)