void SortArr(int arr[], int n) {
for (int startIndex = 0; startIndex < n - 1; ++startIndex) {
int smallestIndex = startIndex;
for (int currentIndex = startIndex + 1; currentIndex < n; ++currentIndex) {
if (arr[currentIndex] < arr[smallestIndex]) {
smallestIndex = currentIndex;
}
}
swap(arr[startIndex], arr[smallestIndex]);
}
}