Question: Write a function template named sequential_search to determine if a vector v contains a particula value x. The function template has two parameters: vectorv, and

Write a function template named "sequential_search" to determine if a vector v contains a particula value x. The function template has two parameters: vectorv, and value x to search. The elements in the vector are not sorted. The function template returns the smallest index of the vector where x is in the vector (in case duplicate elements are stored in the vector), and -1 (negative 1) if x is not foun in the vector. Write your function template in the correct C++ syntax. (10 points). . What is the time complexity of your search function template in terms of the big-O notation? Briefly explain your answer. (5 points)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
