Let ๐บ be a weighted directed acyclic graph with ๐‘š edges and ๐‘› vertices.โ€ฆ

PYQ GATE 2026

Let ๐บ be a weighted directed acyclic graph with ๐‘š edges and ๐‘› vertices. Given ๐บ and a source vertex ๐‘  in ๐บ, which one of the following options gives the worst case time complexity of the fastest algorithm to find the lengths of shortest paths from ๐‘  to all vertices that are reachable from ๐‘  in ๐บ?

  1. A.

    ฮ˜(m+n)

  2. B.

    ฮ˜(m+nlogโกn)

  3. C.

    ฮ˜(nm)

  4. D.

    ฮ˜(n3)

Attempted by 313 students.

Sign up free to check your answer

Sign up free

Explore the full course: Algorithms

Loading lessonโ€ฆ