Consider a directed graph \(G = (V, E)\), where \(V = \{0, 1, 2, ..., 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)
GATE DA 2025 · Graph Traversals (BFS & DFS)
Solve it on GATE DA practice →More Graph Theory & Algorithms problems