This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Iterative implementation of selection sort | |
* | |
* @param arr Array of ints to be sorted in nondecreasing order. | |
*/ | |
public static void selectionSort(int[] arr) | |
{ | |
if(arr == null) throw new NullPointerException(); | |
if(arr.length == 0) throw new IllegalArgumentException(); | |
if(arr.length == 1) return; |