Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package Quick_Sort_181;
- import java.util.*;
- import static Quick_Sort_181.QuickSortMethods.quickSort;
- public class QuickSortMain {
- public static void main(String[] args) {
- Scanner input = new Scanner(System.in);
- System.out.println("Input number of elements /N/ : ");
- int N = input.nextInt();
- int[] arr = new int[N];
- for (int i = 0; i < N; i++) {
- System.out.printf("Input element [%d] : ", i);
- arr[i] = input.nextInt();
- }
- System.out.println("BEFORE : " + Arrays.toString(arr));
- quickSort(arr, 0, N-1);
- System.out.println("AFTER : " + Arrays.toString(arr));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement