#include <iostream>
using namespace std;
int main() {
}
void selectsort(int *arr, int n) {
int i, j, min, temp;
for (i = 0; i < n - 1; i++) {
min = i;
// find the min
for (j = i + 1; j < n; j++) {
if (arr[min] > arr[j]) {
min = j;
}
}
if (min != i) {
temp = arr[min];
arr[min] = arr[i];
arr[i] = temp;
}
}
}
void insertsort(char arr[], int first, int last) {
int i, j;
int temp;
for (i = first + 1; i <= last; i++) {
temp = arr[i];
j = i - 1;
while (j >= first && arr[j] > temp) {
arr[j + 1] = arr[j];
j--;
}
arr[j + 1] = temp;
}
}
#include using namespace std;int main() {}void selectsort(int *arr, int n) { int i, j, min, temp; for (i = 0; i < n - 1; i++) { min = i; // find the min for (j = i + 1; j < n; j+