×

# TIME LIMIT EXCEEDED,HELP

 0 please help for how i can remove TLE error from it MY SOLUTIN IS---- https://www.codechef.com/viewsolution/22485054 asked 15 Jan, 00:35 1 accept rate: 0%

 2 https://www.geeksforgeeks.org/sorting-algorithms/ 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: https://www.geeksforgeeks.org/pigeonhole-sort/ answered 15 Jan, 04:17 7★oleg_b 257●4 accept rate: 17%
 toggle preview community wiki:
Preview

By Email:

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• image?![alt text](/path/img.jpg "title")
• numbered list: 1. Foo 2. Bar
• to add a line break simply add two spaces to where you would like the new line to be.
• basic HTML tags are also supported
• mathemetical formulas in Latex between \$ symbol

Question tags:

×204
×40
×38