Search⌘ K
AI Features

Solution: Reorder Routes to Make All Paths Lead to the City Zero

Solution: Reorder Routes to Make All Paths Lead to the City Zero gives a one-way tree of cities and asks for the minimum roads to reorient so every city can reach city zero.

Statement

There are n cities labeled from 00 to n−1 ...