Floyd–Warshall

Make a table of the cheapest fares between towns. Afterwards you can look up the fare for any pair of towns.

Allow one more intermediate stop and try each route through it. A negative diagonal entry reveals a negative cycle.

Time is O(V³) and space is O(V²). Infinity means no known route. An empty result reports a negative cycle.