I have written the code but cannot complete the assignment please help me to complete. Please don't just copy other s answers as your own. // Insertion sort /* #include <ctime> #include <iostream> using namespace std; void insertionSort(int arr[], int n) { int i, key, j; for (i = 1; i < n; i++) { key = arr[i]; j = i - 1; // Move elements of arr[0..i-1], that are greater than key, to one position ahead of their current position while (j >= 0 && arr[j] > key) { arr[j + 1] = arr[j]; j = j - 1; } arr[j + 1] = key; } } int main() { int n; cout << "Enter the size of the array: "; cin >> n; int arr[n]; cout << "Enter the elements of the array: "; for (int i = 0; i < n; i++) { cin >> arr[i]; } int num = sizeof(arr) / sizeof(arr[0]); clock_t start, end; double timetaken; start = clock(); insertionSort(arr, num); end = clock(); cout << "Sorted array: \n"; for (int i = 0; i < n; i++) cout << arr[i] << " "; cout << endl; timetaken = ((double) (end - start)) / CLOCKS_PER_SEC; cout << "Time taken : " << fixed << timetaken << "s" << endl; return 0; } */ // Shell Sort /* #include <ctime> #include <iostream> using namespace std; int shellSort(int arr[], int n) { for (int gap = n/2; gap > 0; gap /= 2) { for (int i = gap; i < n; i += 1) { int temp = arr[i]; int j; for (j = i; j >= gap && arr[j - gap] > temp; j -= gap) arr[j] = arr[j - gap]; arr[j] = temp; } } return 0; } void printArray(int arr[], int n) { for (int i=0; i<n; i++) cout << arr[i] << " "; } int main() { int n; cout << "Enter the size of the array: "; cin >> n; int arr[n]; cout << "Enter the elements of the array: "; for (int i = 0; i < n; i++) { cin >> arr[i]; } int num = sizeof(arr) / sizeof(arr[0]); clock_t start, end; double timetaken; start = clock(); shellSort(arr, num); end = clock(); cout << "\nArray after sorting: \n"; printArray(arr, n); cout << endl; timetaken = (double)(end - start) / CLOCKS_PER_SEC; cout << "Time taken : " << fixed << timetaken << "s" << endl; return 0; } */ // MergeSort /* #include <ctime> #include <iostream> using namespace std; void merge(int arr[], int l, int m, int r) { int i, j, k; int n1 = m - l + 1; int n2 = r - m; int L[n1], R[n2]; for (i = 0; i < n1; i++) L[i] = arr[l + i]; for (j = 0; j < n2; j++) R[j] = arr[m + 1 + j]; i = 0; j = 0; k = l; while (i < n1 && j < n2) { if (L[i] <= R[j]) { arr[k] = L[i]; i++; } else { arr[k] = R[j]; j++; } k++; } while (i < n1) { arr[k] = L[i]; i++; k++; } while (j < n2) { arr[k] = R[j]; j++; k++; } } void mergeSort(int arr[], int l, int r) { if (l < r) { int m = l + (r - l) / 2; mergeSort(arr, l, m); mergeSort(arr, m + 1, r); merge(arr, l, m, r); } } int main() { int n; cout << "Enter the size of the array: "; cin >> n; int arr[n]; cout << "Enter the elements of the array: "; for (int i = 0; i < n; i++) { cin >> arr[i]; } int arr_size = sizeof(arr) / sizeof(arr[0]); clock_t start; clock_t end; double timetaken; start = clock(); mergeSort(arr, 0, arr_size - 1); end = clock(); timetaken = (double)(end - start) / CLOCKS_PER_SEC; .