Question
Write a program in C++ to implement two different searching techniques: - Linear search - Binary search on a set of integer values stored in
Write a program in C++ to implement two different searching techniques: - Linear search - Binary search on a set of integer values stored in a single dimension array. The user will provide as input the set of the integer values and the number they did like to search for, and the option for the search technique they did like to use. Based on these three inputs provided by the user, your program will output a success prompt and the array index at which the value was found; if the search was successful. Or it should prompt a "not found" message and an option to re-try the search. Your program must be written using functions (worth 10 points).
Input case: 7,2,5,67,89,11,23,6,18,43
option: Linear Search Search value: 16
option: Binary Search
Search Value: 11
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started