please help for how i can remove TLE error from it
MY SOLUTIN IS----
https://www.codechef.com/viewsolution/22485054
please help for how i can remove TLE error from it
MY SOLUTIN IS----
https://www.codechef.com/viewsolution/22485054
Sorting Algorithms - GeeksforGeeks has a good overview of the sorting algorithms. What you implemented is “Bubble Sort” with the time complexity O(N^2) hence the Time Limit Exceeded solution status. You may want to consider more efficient sorting algorithms. For this particular problem - due to the given constraints - a good choice is Pigeonhole Sort: Pigeonhole Sort - GeeksforGeeks