I am trying to find all mother vertex in a directed graph.
A mother vertex in a directed graph G = (V,E) is a vertex v such that all other vertices in G can be reached by a path from v.
Do DFS on each vertex and check if all the vertex are reached on each start node. Time complexity : O(V*(V+E)).
I am looking for any better solutions with better complexity.
Any help would be appreciated.