As reported: Uber coding round (2025): a country of many cities, some joined by two-way bus services, all run by Uber; each city's support team manages the buses departing from or arriving at it. To stop a virus, every inter-city bus service must be cancelled by calling the support teams of some cities — a call cancels all buses departing from or arriving at that city. Find the minimum number of calls, and the cities to call in increasing order. Input:
N M, thenMlinesA B; exampleN = 4, services1–2and3–4→2calls: cities1, 3.
Cities are numbered 1 … n; services[j] = [a, b] is a two-way bus service. Calling city x cancels every service with x as an endpoint. Return the smallest set of cities whose calls cancel every service, as a sorted list. If several smallest sets exist, return the one that is lexicographically smallest as a sorted list.
Example
n = 4, services = [[1,2],[3,4]]
Output: 2 calls: [1,3]
Constraints: 1 ≤ n ≤ 16; 0 ≤ M ≤ n·(n−1)/2; a ≠ b; no service is listed twice.
Code runner format: one JSON value per line: n, services. Implement citiesToCall(n, services); the harness prints the number of calls on the first line and the list on the second.