The smallest sum of numbers between the lines from the beginning to the end point represents the shortest path.
By clicking on the number you mark the lines connecting the start and end points so that the sum of the numbers between the marked lines is the smallest.