Binary String Search
Modify the binarySearch function presented in this chapter so it searches an array of strings instead of an array of int s. Test the function with a driver program. Use Program as a skeleton to complete. (The array must be sorted before the binary search will work.)
Program
#include <iostream>#include <string>using namespace std;int main( ){ const int NUM_NAMES = 20; string names[NUM_NAMES] = {"Collins, Bill", "Smith, Bart", "Allen, Jim", "Griffin, Jim", "Stamey, Marty", "Rose, Geri", "Taylor, Terri", "Johnson, Jill", "Allison, Jeff", "Looney, Joe", "Wolfe, Bill", "James, Jean", "Weaver, Jim", "Pore, Bob", "Rutherford, Greg", "Javens, Renee", "Harrison, Rose", "Setzer, Cathy", "Pike, Gordon", "Holland, Beth"}; // Insert your code to complete this programreturn 0;}
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.