Minimal Edge Reversal in Directed Graph
Asked at HackerRank · Coding Questions · Difficulty: Medium
You are given a directed graph whose nodes are labeled `1..n`. Choose one node as the root, then reverse as few directed edges as possible so that every edge points away from that root. Return the smallest number of reversals over all possible choices of root.
Loading the problem…