Skip to content

Instantly share code, notes, and snippets.

View zmohling's full-sized avatar
🎯
Focusing

Zachary Mohling zmohling

🎯
Focusing
  • Ames, IA
View GitHub Profile
@zmohling
zmohling / 🧽.gif
Last active October 23, 2023 05:07 — forked from EvanBacon/🧽.gif
🧽.gif
/**
* 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;