Minimum Edge Reversals So Every Node Is Reachable at MathWorks

Hard57.2% acceptance

This problem has 75.0% frequency at MathWorks.

Problem Description

There is a **simple directed graph** with `n` nodes labeled from `0` to `n - 1`. The graph would form a **tree** if its edges were bi-directional. You are given an integer `n` and a **2D** integer array `edges`, where `edges[i] = [ui, vi]` represents a **directed edge** going from node `ui` to node...

Read full problem and hints

Topics

Also asked at 9 companies


More MathWorks Questions

View all MathWorks questions