Design a Task Dependency (DAG) Tracker
Problem Design a system to track and display task dependencies within a project (Asana's domain).
Requirements
addTask,addDependency(a, b)(a blocks b).- Detect cycles (an invalid dependency).
- Compute ready tasks (those with no incomplete blockers).
- Mark a task complete, unblocking its dependents.
Areas to design
- The DAG model and cycle detection at add time.
- Querying ready vs blocked tasks (a topological view).
- Separation of the model from the query layer.
added …