At the end of this project, you are expected to be able to explain to anyone, without the help of Google:
- What is a search algorithm
- What is a linear search
- What is a binary search
- What is the best search algorithm to use depending on your needs
Write a function that searches for a value in an array of integers using the Linear search algorithm
- Prototype : int linear_search(int *array, size_t size, int value);
- Where array is a pointer to the first element of the array to search in
- size is the number of elements in array
- And value is the value to search for
- Your function must return the first index where value is located
- If value is not present in array or if array is NULL, your function must return -1