I am trying to understand the approach for this problem:
"If all streets are one way, there is still a legal way to drive from one intersection to another"
The question is to prove that it can be done in linear time. I am not looking for direct answers but the approach to this problem.
How can I think about this problem in terms of graph theory? AFAI understand, this will result in a DAG. But then should I choose BFS or DFS and why to prove it? (both are liner time algos)