> What is the time complexity of finding the diagonal of a graph > $G=(\cal V,E)$? > > - $\cal{O}(|V|^2)$ > - $\cal{O}(|V|^2+|V| \cdot |E|)$ > - $\cal{O}(|V|^2\cdot |E|)$ > - $\cal{O}(|V|\cdot |E|^2)$ <sup>The diagonal of a graph $G$ is the longest distance in graph. </sup> I have no idea what to do about it, I need a complete analysis on how to solve a problem like this.