Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
The very basics
Infinite looping
Processing graphs with recursive CTE
25. Graphs – real life example
Summary

Instruction

Very well done! Since you already know the table, you can tackle this exercise.

Let's say we have a salesman who needs to travel between certain cities in the UK, as shown in the picture below.

recursion

There are 6 cities and multiple connections between them, some of which are shown in the picture. The salesman needs to travel starting from London, and visit each city.

Exercise

Our salesman starts his journey in London and then wants to visit each city. In which direction should he go? In which city should he finish his journey? Let's help him by calculating the shortest path that will visit all cities. Run the template, see the results and don't worry about the details now.