You are viewing a single comment's thread. Return to all comments →
Well first off it seems that your sort function does nothing. If I add a bit of code to print out the array after sorting like this:
quickSort(arr,l,r); for(int i=0; i<n; i++){ System.out.print(arr[i]); System.out.print(' '); } System.out.println();
It prints out the same array as the input. Try the built in sort function:
Arrays.sort(arr);
Seems like cookies are disabled on this browser, please enable them to open this website
Ice Cream Parlor
You are viewing a single comment's thread. Return to all comments →
Well first off it seems that your sort function does nothing. If I add a bit of code to print out the array after sorting like this:
It prints out the same array as the input. Try the built in sort function: