Leetcode 1557. Minimum Number of Vertices to Reach All Nodes
Posted on Sat 08 February 2025 in Leetcode • Tagged with topological-sorting
Question Link : https://leetcode.com/problems/minimum-number-of-vertices-to-reach-all-nodes/
Difficulty: Medium
Premium: False
Question
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. Find the smallest set of vertices …
Continue reading