Selection Sort
Selection Sort
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int minIndex = i;
minIndex = j;
arr[minIndex] = arr[i];
arr[i] = temp;
}
// Function to get high-resolution time
double get_time_in_seconds() {
clock_gettime(CLOCK_MONOTONIC, &start);
int main() {
int *arr = (int*) malloc(n * sizeof(int)); // Allocate memory for the array
generateRandomArray(arr, n);
selectionSort(arr, n);
return 0;