Can Breadth First Search be used on Directed Acyclic Graph?
For example, you start with the root node (say it has 3 connected nodes, edges all pointing towards them from the root), following BFS, you visit the first connected node from the root following the directed edge, and you got to come back to the root node and visit the second connected node if it were an undirected graph, but you can't in the case of directed graph, so I assume BFS cannot be used on Directed Acyclic Graph?
Also,a line of nodes as such 1 -> 2 -> 3 -> 4 can be considered as a Directed Acyclic Graph, correct?
Thank
rootand then start pop'ing them. The fact that there is no edge pointing back is irrelevant. - Nir Alfasirootin DAG ? a node that has only "out" edges ? what if there are few such nodes ? - Nir Alfasi