1. Write a C Program to Implement Linear Search.--...
1. Write a C Program to Implement Linear Search.--...
int main() {
int arr[] = {10, 5, 20, 8, 15};
int size = sizeof(arr) / sizeof(arr[0]);
int key = 20;
if (result != -1) {
printf("Element found at index: %d\n", result);
} else {
printf("Element not found.\n");
}
return 0;
}
● b) Quick Sort:
#include <stdio.h>
return (i + 1);
}
● c) Insertion Sort:
#include <stdio.h>