CodeChef Discuss
bibhuojha
To Convert O(n^2) into O(n.logn).