[solved]-Write C Function Implements Liner Search Algorithm Linear Search Algorithm Returns Indices Q38993623
Write a C function that implements the Liner Search algorithm.This linear search algorithm returns the indices of the longestsorted subset of numbers in an array of integers of size n. Thelongest sorted subset of numbers must satisfy three conditions.First, the subset consists of unique numbers (no duplicate);second, all the numbers in this subset is divisible by m, theminimum size of the subset is two elements. In the main methodprint all values of all the discovered longest sorted subsets

Rules and Conditions
1. The Linear Search has a return type of type void LinearSearch(),you CAN NOT change the return type of the function it MUST bevoid.
2. Feel free to change the argument list in LinearSearch(int size,int data[])
3. You are NOT allowed to use any input or output operations (e.g.scanf or printf) in the body of the function Linear Search
4. You are NOT allowed to use any Global or Static variable
5. You May create some additional functions if needed
6. You are NOT allowed to use the goto statement
Examples, find the longest sorted subset that is divisible by 3 8 6 5 3 2 12 9 21 30 The longest sorted subset that is divisible by 3 is (9, 21, 30. It exists between indices [7-9]. Note (6, 9, 9, 21, 30) is not the longest because the value 9 exists twice. Examples, find the longest sorted subset that is divisible by 2 8 20 2 6 0 3 12 14 3 5 The longest sorted subset that is divisible by 2 are (2, 6, 8) and {12, 14, 20. The exist between indices [0-2] and [5-7]. Note (6, 9, 9, 21, 30 is not the longest because the value 9 exists twice. Examples, find the longest sorted subset that is divisible by 3 19 13 11 2 17 1 5 The longest sorted subset that is divisible by 2 is empty or null. Examples, find the longest sorted subset that is divisible by 5 5 15 50 3 19 80 50 10 2 7 The longest sorted subset that is divisible by 5 are (5, 15, 50) and (80, 50, 10. The exist between indices [0-2] and [5-7]. Show transcribed image text Examples, find the longest sorted subset that is divisible by 3 8 6 5 3 2 12 9 21 30 The longest sorted subset that is divisible by 3 is (9, 21, 30. It exists between indices [7-9]. Note (6, 9, 9, 21, 30) is not the longest because the value 9 exists twice. Examples, find the longest sorted subset that is divisible by 2 8 20 2 6 0 3 12 14 3 5 The longest sorted subset that is divisible by 2 are (2, 6, 8) and {12, 14, 20. The exist between indices [0-2] and [5-7]. Note (6, 9, 9, 21, 30 is not the longest because the value 9 exists twice. Examples, find the longest sorted subset that is divisible by 3 19 13 11 2 17 1 5 The longest sorted subset that is divisible by 2 is empty or null. Examples, find the longest sorted subset that is divisible by 5 5 15 50 3 19 80 50 10 2 7 The longest sorted subset that is divisible by 5 are (5, 15, 50) and (80, 50, 10. The exist between indices [0-2] and [5-7].
Expert Answer
Answer to Write a C function that implements the Liner Search algorithm. This linear search algorithm returns the indices of the l… . . .
OR

