Directed Acyclic Graph (DAG) Algorithm Problem
Given a Directed Acyclic Graph (DAG), determine if there is a path from node A to node B. The input includes three parts: the number of nodes, a list of edges, and the start and end nodes for the quer...
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Standard Input
Execution Result:
