Finding "Source" in a Directed Graph

Правка en1, от WARush143, 2016-11-04 22:12:26

Hi community!

Today I am interested in this problem:

Given a directed graph, define f(v) to be the number of nodes i such you can reach i from v by moving along edges. For which values of v is f(v) maximum?

I can come up with the O(n2) algorithm, but I wonder if there is an O(n) algorithm.

Thanks!

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский WARush143 2016-11-04 22:12:26 363 Initial revision (published)