This is the answer I submitted for the problem POINTS. The logic I implemented is fairly simple. After taking the input, I first sort all the points in ascending order of the x-coordinates. After that, I traverse this sorted array, and again sort the points, which have same value of x-coordinate, in descending order of their y-coordinates. Also, I have made two quicksort functions: one to sort in ascending order of x, and the other to sort in descending order of y.
I am getting correct answer for the test cases. Also, I verified my answers for some fairly large numbers. Can anybody help me with this issue?