This is regarding the complexity of an algorithm for counting triangles in an undirected graph which was suggested in a document I came across.
(Link - https://www.cs.cmu.edu/~15750/notes/lec1.pdf)
Suppose the graph has $m$ edges and $n$ vertices. The algorithm goes as follows: sort the vertices in increasing order of degree ($v_1 \cdots v_n$) and scan them beginning at the lowest degree vertex. When you are at vertex $v_i$, only scan pairs of edges (which could potentially be triangles) of the form $(\{v_i,v_j\},\{v_i, v_k\})$ where $j,k>i$. The document says that the time complexity of this algorithm is $O(m^{3/2})$. There’s no proof in the document and I’ve been trying to prove it but have not been able to. How do you show this?