Quick sort challenge

from 2 only on test case pass but the output is correct
what is the problem with this help ASAP

import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int [] A = new int[N];

	for(int i=0; i<A.length; i++)
	{
		A[i] = sc.nextInt();
	}
	quick(A,0,A.length-1);
	for(int val : A)
	{
		System.out.print(val+" ");
	}
}
public static void quick(int[] arr, int lo, int hi)
{
	//base case
	if(lo>=hi)
	{
		return;
	}
	int mid = (lo+hi)/2;
	int pivot = arr[mid];

	int left = lo;
	int right = hi;

	while(left<=right)
	{
		while(arr[left]<pivot)
		{
			left++;
		}
		while(arr[right]>pivot)
		{
			right--;
		}

		if(left<=right)
		{
			int temp = arr[left];
			arr[left] = arr[right];
			arr[right] = temp;

			left++;
			right--;

		}
	quick(arr,lo,right);
	quick(arr,left,hi);
	}
}

}

@Naman_Gupta,
Your code is correct. There might be a technical problem. Please drop a mail to [email protected].

r u sure bcz it is giving me correct output but no passing one testcase out of two test cases so i have to mail it on support

@Naman_Gupta,
https://ide.codingblocks.com/s/261967 corrected code.

Sorry, my mistake. There was a very trivial mistake in your code. The recursive call for quick was inside the while loop. Hence the TLE in your code.