Aaman007's blog

By Aaman007, 7 weeks ago, In English,

Given a directed graph of n nodes and m edges . What is the minimum number of edges that should be added to the graph so that from each node , it is possible to travel all the other nodes .

One of the approach to find the result was to count number of node that has indegree 0 in cnt1 and number of node that has outdegree 0 in cnt2 . Then the result is max(cnt1,cnt2) . But I couldn't understood this approach . Can someone explain it or provide any other approach to find the result .

 
 
 
 

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it
»
5 weeks ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it