I'm looking to build a linear time algorithm that determines if given a directed graph $G=(V,E)$ , and for every $u,v\in{V}$ there exists $w\in{V}$ where there is a path from $w$ to $u$ and a path from $w$ to $v$.
I thought of running DFS from a random vertex $u$ and then to check if the resulting DFS tree has a vertex $w$ with a back edge to $u$ this way i take care of finding a vertex $w$ that has a path to $u$, and i think this $w$ will also have a path to any descendant of $u$.
Does this algorithm cover all of the cases?