GATE DA 2025 — Question 65

Programming, Data Structures and Algorithmsbasic graph algorithms: traversals and shortest pathNAT2 marksHard

Consider a directed graph \(G = (V, E)\), where \(V = \{0, 1, 2, \ldots, 100\}\) and \(E = \{(i, j) : 0 < j - i \le 2, \text{ for all } i, j \in V\}\). Suppose the adjacency list of each vertex is in decreasing order of vertex number, and depth-first search (DFS) is performed at vertex 0. The number of vertices that will be discovered after vertex 50 is ____________(Answer in integer)
Practise the full 2025 paper
Challenge a friend: WhatsApp Telegram
Recommended book · affiliate linkIntroduction to Algorithms (CLRS)The standard reference behind most GATE algorithm questions.
Practise more on basic graph algorithms: traversals and shortest pathTimed, 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