GATE CS 2026 (Afternoon) — Question 37

AlgorithmsGraph Traversals (BFS, DFS) & Single-Source Shortest PathsMCQ2 marks · −2/3 if wrongMedium

Let \( G \) be a weighted directed acyclic graph with \( m \) edges and \( n \) vertices. Given \( G \) and a source vertex \( s \) in \( G \), which one of the following options gives the worst case time complexity of the fastest algorithm to find the lengths of shortest paths from \( s \) to all vertices that are reachable from \( s \) in \( G \)?
  1. A
    \( \theta(m + n) \)
  2. B
    \( \theta(m + n \log(n)) \)
  3. C
    \( \theta(nm) \)
  4. D
    \( \theta(n^3) \)
Practise the full 2026-AN paper
Challenge a friend: WhatsApp Telegram
From RENYXERAWhat rank do your marks get?GATE score, likely All-India Rank and qualifying marks for your category.
Practise more on Graph Traversals (BFS, DFS) & Single-Source Shortest PathsTimed, in the real exam interface · free to start

A GATE question every morning

One real past-paper question every morning for your branch, answer hidden until you tap. Free on Telegram.

Join
Stuck? Ask in the student group