Data Structures | Graph | Question 9
In which scenario would a directed acyclic graph (DAG) be most suitable?
Representing dependencies between tasks in a project schedule
Modeling a social network with friend connections
Finding the shortest path between two nodes in a weighted graph
Performing breadth-first search (BFS) on a graph
Directed acyclic graphs (DAGs) are commonly used to represent dependencies between tasks in a project schedule. DAGs ensure that the tasks are organized in a way that no cycles exist, allowing for efficient scheduling and task sequencing.
Quiz of this Question
Please comment below if you find anything wrong in the above post