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 presents a tree of one-way roads and asks for the fewest reorientations needed so every city can reach city zero.

Statement

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