13 size_t min_idx = start;
15 for (
size_t j = start + 1; j < n; j++) {
16 if (strcmp(arr[j], arr[min_idx]) < 0) {
28 for (
size_t i = 0; i < n - 1; i++) {
35 arr[i] = arr[min_idx];
45 for (
size_t i = 0; i < n - 1; i++) {
48 for (
size_t j = i + 1; j < n; j++) {
49 if (arr[j] < arr[min_idx]) {
56 arr[i] = arr[min_idx];
void selection_sort_ints(int *arr, size_t n)
size_t find_min_index(char **arr, size_t start, size_t n)
void selection_sort_strings(char **arr, size_t n)
Unified header for all sorting algorithms.