Let's name the vertex from which all other vertices are accessible, vista vertex. If the graph has a vista vertex, then it should have only one SCC source (since two SCC sources are inaccessible from each other), which should contain the perspective vertex (if it is in any other SCC, there is no way from the vista vertex to the original SCC). Moreover, in this case, each vertex in the original SCC will be the peak of the perspective. Then the algorithm is simply used for DFS, starting at any node and marking the top using the highest possible time finish. This should be in the original SCC. Now we run DFS again from this to check if we can reach all nodes. Because the algorithm simply uses decomposition in SCC and DFS, the runtime is linear. This algorithm is correct. Note that a vista vertex will exist if and only if there is only one SCC source. Any vertex in the source SCC is available only for other vertices in the same SCC, so no vertex can reach the vertices in two different SCC sources. In addition, if there is one SCC source, any vertex in this SCC is vista vertex, since all of them are available for each Other. Please note that DFS, which runs in any particular SCC, will not be completed until all SCCs that were accessible from it. This means that the last node ends in SCC which is inaccessible from any other SCC, that is, from the SCC source. Thus, in the first part of our algorithm, we find the node in the original SCC. Performing DFS, we will correctly determine whether it is a vertex vertex, and if it is not a vertex, we know that it does not have our graph.
antz
source share