Number of triangles in a graph based on number of edges
So far, I came up with a proof myself, but others may help verify this proof:
Lemma. Given a graph $G(V,E)$, the number of its triangles is $O(|E|^{1.5})$.
Proof. For each node $v$, let us denote by $A(v)$ the set $\{u \in N(v), d(u) \geq d(v)\}$; this set contains only neighbors of $v$ whose degree is no less than degree of $v$ itself.
Without loss of generality, let's consider each triangle $\Delta_{uvw}$ such that $d(u) \leq d(v) \leq d(w)$, where $d(v)$ is the degree of node $v$ in $G$. One may then discover $\Delta_{uvw}$ by checking that $w$ is in $A(u) \cap A(v)$.
Thus, we can claim that the set of triangles is $T=\{\Delta_{uvw} | (u,v) \in E, w \in A(u) \cap A(v)\}$. Therefore, we only need to prove that for every edge $(u,v) \in E$, the $|A(u)|$ and $|A(v)|$ are both $O(\sqrt{|E|})$.
Suppose $u$ has $\omega(\sqrt{|E|})$ such neighbors in $A(u)$. Since the degree of all of them is at least equal to the degree of $u$, the total number of edges become $\omega(|E|)$ which is a contradiction.
So we can claim that $|T| \in O(|E|^{1.5})$.