This is an interview question.
In a directed graph how can you find a cycle? is it possible to find using BFS, why BFS is preferred over DFS.
AFAIK, DFS is a clear winner in this case, as it's easy to find the cycle and it's more efficient in terms of memory. So are there any advantages of using BFS in this case, that I am unaware of.