LeetCode: 1557-Minimum Number of Vertices to Reach All Nodes 解題紀錄
Last Updated on 2023-05-18 by Clay
題目
Given a directed acyclic graph, with n
vertices numbered from 0
to n-1
, and an array edges
where edges[i] = [fromi, toi]
represents a directed edge from node fromi
to node toi
.