I stumbled upon the problem of Chef and Integers (http://www.codechef.com/problems/INTEG), and thought I’ll give it a try. Now, the algorithm I’ve implemented uses sort. Now this obviously leads to a TLE for large input cases surely but is working otherwise. How should I implement sort to take care of this?
Or the only option there is, is to implement a different algorithm? How should that go about?