Smallest set of vertices to visit all nodes of the given Graph
Given a directed acyclic graph of N nodes, the task is to find the smallest set of vertices from which the complete graph can be visited. Examples:Â Input: Graph in the image below Output: 0 4Explanation: From vertex 0, the set of nodes that can be visited is {0 ,1}. Similarly, from vertex 4, {4, 3,