Implement a DAG Utility Class (Add Edges, Validate, and Query)

Asked at Notion · Coding Questions · Difficulty: Medium

Implement a `DAG` utility class for task dependencies. Each task is identified by a string id. A directed edge `A -> B` means **B depends on A**.

Loading the problem…