TSORT - Turbo Sort
Given the list of numbers, you are to sort them in non decreasing order.
t – the number of numbers in list, then t lines follow [t <= 10^6].
Each line contains one integer: N [0 <= N <= 10^6]
Output given numbers in non decreasing order.
5 5 3 6 7 1
1 3 5 6 7
I am using an c++ implementation of a rather optimized version of quicksort and still getting TLE. Am I doing something wrong or is just quicksort not effective enough?
The 1st 5 is the number of numbers in the input file.