Check all paths from the ith indexed city
if ( j == tsp . GetLength ( 0 ) ) { sum += min ; min = int . MaxValue ; visitedRouteList . Add ( route [ counter ] - 1 ) ; j = 0 ; i = route [ counter ] - 1 ; counter ++ ; } }