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