void SelectionSort(DataT array[], int size) { size_t small; for(size_t current = 0; current < size; ++current) { size_t small = current; for(size_t j = current + 1; j < size; ++j) { if (array[small] > array[j]) { small = j; } } if (small != current) { DataT tmp {array[small]}; array[small] = array[current]; array[current] = tmp; } } }