From 73c2b00a10c5786ddeeacc915e233fd4df1c9321 Mon Sep 17 00:00:00 2001 From: Martial Simon Date: Sat, 11 Oct 2025 22:19:00 +0200 Subject: fix: evalexpr & tinyprintf contenaient toute la piscine --- rushs/evalexpr/selection_sort/selection_sort.c | 30 -------------------------- 1 file changed, 30 deletions(-) delete mode 100644 rushs/evalexpr/selection_sort/selection_sort.c (limited to 'rushs/evalexpr/selection_sort') diff --git a/rushs/evalexpr/selection_sort/selection_sort.c b/rushs/evalexpr/selection_sort/selection_sort.c deleted file mode 100644 index 98adc7e..0000000 --- a/rushs/evalexpr/selection_sort/selection_sort.c +++ /dev/null @@ -1,30 +0,0 @@ -#include - -void swap(int *a, int *b) -{ - int tmp = *a; - *a = *b; - *b = tmp; -} - -unsigned array_min(const int arr[], unsigned start, unsigned size) -{ - unsigned min = start; - for (; start < size; start++) - { - if (arr[min] > arr[start]) - { - min = start; - } - } - return min; -} - -void selection_sort(int arr[], unsigned size) -{ - for (size_t i = 0; i < size; i++) - { - unsigned j = array_min(arr, i, size); - swap(&(arr[i]), &(arr[j])); - } -} -- cgit v1.2.3