Exercises on Sorting and Searching Algorithms Exercises on Sorting Algorithms Challenge 1: Bubble Sort Write a C program that implements the bubble sort algorithm to sort an array of integers. Display the array before and after sorting.
Challenge 2 : Tri par Insertion Write a C program that implements the insertion sort algorithm to sort an array of integers. Display the array before and after sorting.
Challenge 3: Sort by Selection Write a C program that implements the selection sort algorithm to sort an array of integers. Display the array before and after sorting.
Challenge 4: Quick Sort Write a C program that implements the quicksort algorithm to sort an array of integers. Display the array before and after sorting.
Challenge 5 : Tri Fusion Write a C program that implements the merge sort algorithm to sort an array of integers. Display the array before and after sorting.
Challenge 6: Sorting by Counting Write a C program that implements the counting sort algorithm to sort an array of integers. Ensure that the values are within a predefined range. Display the array before and after sorting.
Challenge 7: Sorting and Searching Sub-Tables Write a C program that uses a quicksort algorithm to sort an array of integers, then implements a binary search to find a given sorted subarray.
Exercises on Search Algorithms Challenge 1: Linear Search Write a C program that implements the linear search algorithm to find an element in an array of integers. Display whether the element is found or not.
Challenge 2: Binary Search Write a C program that implements the binary search algorithm to find an element in a sorted integer array. Display the index of the element being searched for or a message indicating that the element is not found.
Challenge 3: Search for the Minimum Element Write a C program that uses linear search to find the minimum in an array of integers. Print the minimum value and its index.
Challenge 4: Search for the Maximum Element Write a C program that uses linear search to find the maximum in an array of integers. Print the maximum value and its index.
Challenge 5: Search for a Substring Write a C program that uses linear search to find a substring in a string. Display the index of the first occurrence of the substring or a message indicating that the substring is not found.
Challenge 6: Search for Duplication Write a C program that implements a linear search to check if an array of integers contains duplicates. Display a message indicating whether there are duplicates or not.
Challenge 7: Binary Search on a Linked List Write a C program that implements a binary search on a sorted linked list. Display the index of the searched element or a message indicating that the element is not found.
Challenge 8: Word Search in a Text Write a C program that uses substring searching to find the first occurrence of a word in a given text. Print the position of the first occurrence or a message indicating that the word is not found.