Question link:TSORT Problem - CodeChef
MY SOLUTION IS
Thanks for A2A.
You have created an array of size 10, while in the question, limit is 1000000.
And then you are trying to access the memory locations which are located after the array.
Make the array of size n (which is t in the problem statement) and then sort the array using optimal sorting algorithm.
And please provide well structured code or your submission link, from next time.
This error is because of Array index out of bound.