Question: This also uses the solutions for fileIO.cpp and checkArray.cpp from my last post. (Exercise) Create - searchArray1.cpp In this part of the lab, you will

This also uses the solutions for fileIO.cpp and checkArray.cpp from my last post.
(Exercise) Create - searchArray1.cpp In this part of the lab, you will create a recursive function that searches for a key in an array with a binary search algorithm. Revisit lecture 4 for the concept of the binary search algorithm. All you need to do is to repeat splitting an array by half and compare the key to the value of the middle element. In the main function: Input an array from a file. created from the previous exe code that you wrote so far (exercise 2) *Call function (checkArraySort) to check if the array is sorted. So far, you can use the code you rcises. .Exit program if the array is not sorted, otherwise continue to the next steps. Once again, you can use the Prompt the user to input the search key (k) * Call function (binarySearchR) to search for the key recursively .Output your search result: o "Found key "
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
