java sort 구현


java sort 구현

public class ArraySorter { public static void selectionSort(int[] anArray) { for (int index = 0; index < anArray.length - 1; index++) { // Place the correct value in anArray[index] int indexOfNextSmallest = getIndexOfSmallest(index, anArray); interchange(index, indexOfNextSmallest, anArray); // Assertion:anArray[0] <= anArray[1] <=...<= anArray[index] // and these are the smallest of the original array elements. // The remaining positions contain the rest of the original // array elements. } } p...



원문링크 : java sort 구현