Master Mathematics.

Programming · Graph Algorithms · Problem 4

DFS on i → i + 1, i + 2

A directed graph has and . Each adjacency list is in decreasing order of vertex number, and DFS starts at . The number of vertices discovered after vertex is .

Source: GATE DA