Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please use C++ code applicable to an introductory class Assume you have a set of parallel arrays in main0 as follows const int NUMBER 12
Please use C++ code applicable to an introductory class
Assume you have a set of parallel arrays in main0 as follows const int NUMBER 12 const int BUFFER SIZE 16, int id NUMBER (8236, 4578, 358, 7092, 0475, 8478, 4587, 709, 7528, 7541, 6457, 3) char name[NUMBERIBUFFER_SIZEI Wendy". "Bob, "Jane", Fred, Tony", "Art" Becky", "Cathy" "Joan", "Tom", "Aaron", "John"T STEP 1: Write a program that will first sort the arrays based on id. STEP 2: Perform a binary search as follows: . Search for 7092 and output "id name. For example, 7092 Fred . Search for 3 and output "id name. For example, 3:John . Search for 9455 and output "not found. STEP 3: perform a linear search as follows Search for "Wendy and output id name. For example, 8236.Wendy . Search for Tom and output id name. For example, 7541 Tom Search for "Anthony and output not foundStep 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