gitarist's blog

By gitarist, history, 5 years ago, In English

Hello everyone. I need your help. I have been trying to solve a problem from code chef, and I wonder whether, it is possible to count number of paths with length i for all i in [1..n] on an acyclic undirected graph in O(n*log(n)) time complexity or not. Here, by length of a path I mean the number of nodes the path contains.

  • Vote: I like it
  • +23
  • Vote: I do not like it

»
5 years ago, # |
  Vote: I like it +11 Vote: I do not like it

any idea with suitable complexity?