Reorder Routes to Make All Paths Lead to the City Zero
Represent the n cities and n-1 directed roads as an undirected tree. Use BFS or DFS to calculate the minimum required edge reversals for this Uber OA.
Check more interview questions and experiences about Uber
