Quicksort Problem

The third test case is passing in https://ide.codingblocks.com/s/55203
but not with https://ide.codingblocks.com/s/55202
and shows TLE with https://ide.codingblocks.com/s/55206
although I have used randomization in all of them.
Please explain

Question is ---------
QUICKSORT
Given an array A, of N elements. Sort the array using quicksort algorithm.(Note : Use randomized quicksort, otherwise worst case will not pass).

Input Format:
A single integer, N, denoting the number of elements in array. Next line contains N integers, denoting the elements of array.

Constraints:
1<=N<=2*10^5 |Ai|<=10^9

Output Format
Print in a single line, N spaced integers, denoting the elements of array A in sorted order.

Sample Input
5
3 6 4 1 2
Sample Output
1 2 3 4 6

C++
Download Testcases
Unlock Editorial
Submit Code
Custom Input

Run Code
Output :

Hi Akshay, please check the constraints of the question.
Constraints:
1<=N<=2*10^5 |Ai|<=10^9

You will need to use long data type.
I’ve corrected your code, you can refer to it here https://ide.codingblocks.com/s/55833

No, actually all test cases had passed using https://ide.codingblocks.com/s/55203 only.
I am just curious as to why one test case didn’t pass using https://ide.codingblocks.com/s/55202 and why did that test case show TLE with https://ide.codingblocks.com/s/55206

Could you please explain ?