Question: a. Modify the implemented sort algorithm so that it calculates and prints the number of comparisons, using the data provided in problem #2. b. Modify

a. Modify the implemented sort algorithm so that it calculates and prints the number of comparisons, using the data provided in problem #2.
b. Modify the Binary Search Algorithm that calculates and prints the number of comparisons. Use the data provided in problem #2 to find both the values 79422 and 79421
Lottery Winners Modification Modify the program you wrote for Programming Challenge 2 (Lottery Winners) so it performs a binary search instead of a linear search. \#include using namespace std; int main() \{ int numbers [1]={13579,26791,26792,33445,55555, 62483,77777,79422,85647,93121}; int i, win =1,n; cout "Enter the winning number: "; cin ni for (i=;i
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
