HEY THERE ! I'm having problem when I submit my code for TurboSort Problem Code: TSORT I'm using quicksort for it but somehow I get a Time Limit exceeded answer Please help I've been stuck for a long time on this !!! HELP A BEGINNER
Thanks.
asked 21 Jul '17, 13:37

Quick sort can be O(N^2) in worst case which will give you a TLE. You can simply use inbuilt sort function of C++ to get AC. The in built sort function is always O(NlogN) and uses many factors like recursion depth etc to determine how it should proceed further. Its used like answered 21 Jul '17, 13:53

Hey please use merge sort. Or use a randomized version of quick sort. Link to learn: answered 26 Sep '17, 21:48
