퀵 정렬( Quick Sort ) 알고리즘
public class QuickSortTest { private void quickSort2(int[] arr, int start, int end) { int part2 = partition(arr , start , end); //분할 if(start < part2 -1 ) { quickSort2(arr, start, part2-1); } if(part2 < end) { quickSort2(arr, part2, end); } } private int partition(int[] arr, int start, int end) { int pivot = arr[(start + end) / 2]; while(start pivot) { end--; } if(start
2020. 6. 4.