is_valid_tour()
Check if a tour is valid.
n (int) – The number of cities.
int
tour (List[int]) – The tour to test whether it is valid.
List
bool
True if the tour is valid, False otherwise.