So if we assume that we have some strongly connected component G with n vertices. I would like to find the length of the longest path in that component.
My idea is: In a strongly connected component we can get from one vertex to every other vertex.
If we start at some vertex u then we can visit each of the remaining n-1 vertices by going from the vertex we are currently on to some adjacent vertex, setting the vertex we reach as the current one and repeating until we have no unvisited vertices left. As such the longest path always has length n-1.
Another idea is that we can run depth first search on the connected component and the highest level found will be the length of the longest path.
Intuitively these ideas make sense to me but not sure how to structure them formally or even if they are right. Could I get some guidance on this?