Time Limit Exceeded in Turbo Sort Question

Question Link : Contest Page | CodeChef
My Submission : Solution: 45342979 | CodeChef
Please explainWhy time limit exceeded ? What are the ways to reduce run time ?

Help Please :pray:

How are you expecting Bubble Sort to get accepted when T<= 10^6 and N <= 10^6.
You should first read about different sorting techniques and their time complexity.

2 Likes