There are n cities labeled from
Last year, the Ministry of transport made all roads one-way due to their narrow width. These roads are represented as connections, where each entry connections[i]
This year, a major event will occur in the capital city (city
Note: A solution is guaranteed to exist, meaning that every city can eventually reach city
after reordering.
Constraints:
n
connections.length
connections[i].length
There are n cities labeled from
Last year, the Ministry of transport made all roads one-way due to their narrow width. These roads are represented as connections, where each entry connections[i]
This year, a major event will occur in the capital city (city
Note: A solution is guaranteed to exist, meaning that every city can eventually reach city
after reordering.
Constraints:
n
connections.length
connections[i].length