Search
⌘K

Leetcode 1557. Minimum Number of Vertices to Reach All Nodes

Given a directed acyclic graph, find the smallest set of starting vertices from which every node is reachable. In a DAG this is uniquely achieved by selecting all nodes with zero in-degree (sources).


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.