We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int n = in.nextInt();
Integer[] ar = new Integer[n];
for(int i=0;i<n;i++){
ar[i]=in.nextInt();
}
quickSort(ar);
}
}
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Quicksort 2 - Sorting
You are viewing a single comment's thread. Return to all comments →
I used JAVA.
import java.util.*; public class Solution {
static ArrayList quickSort(Integer[] ar) {
static void printArray(Integer[] ar) { for(int n: ar){ System.out.print(n+" "); } System.out.println(""); }
}