Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In this part of the lab, you will create a search function (binary Search L) that is similar to exercise 3 with the following change:
In this part of the lab, you will create a search function (binary Search L) that is similar to exercise 3 with the following change: You will implement the binary search algorithm using a loop instead of a recursive function. This time all you need to do is to call a search function you create with the following arguments: a string array A (again, it is a pointer) the number of elements in the array the key to search for (a string) Return: -1 if the key was not found index of the (first) element where you found the key. Your program should behave the same way as searchArrayl.cpp in the previous exercise; therefore, you may reuse the main function in searchArrayl.cpp Before writing your binary Search L function, think about the algorithm and write it in pseudocode using a piece of paper or a text editor. You need to turn in the pseudocode to receive full credit
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