Minimum size of largest clique in graph I'm having trouble with a problem from HackerRank, and I'm hoping someone here can enlighten me. The problem is stated like this:


  What is the minimum size of the largest clique in any graph with N nodes and M edges?


The hints suggest using Turan's theorem, but it's not clear to me how to get from that to a solution.

How can I solve this problem, either with or without Turan's theorem?

The full questions is here.
Turán's theorem states that if a graph on $n$ vertices doesn't contain an $(r+1)$-clique then it has at most $\lfloor \frac{r-1}{r} \frac{n^2}{2} \rfloor$ edges. You take it from here.