in Algorithms edited by
509 views
0 votes
0 votes

Suppose we have a directed graph G = (V,E) with V= {1, 2, ..., n} and Eis presented as an adjacency list. For each vertex u in V, out(u) is a list such that (u, v) in {1, 2, ... k). For each u in V, we wish to compute a corresponding list in(u) =such that in E for each i in {1, 2, ... k'). Let n be the number of vertices in Vand m be the number of edges in E. How long would it take to construct the lists in(u), u in V, from the lists out(u), u in V?

  1. T(n) =O(n+m)            B. T(n)= O(n(m+n))

 

in Algorithms edited by
509 views

Please log in or register to answer this question.

Related questions