C++ LANGUAGE Search Metrics In this exercise you will explore the performance difference between sequential search and binary search. To do so write a program that performs the following tasks: Prompt the user for a file containing 100,000 unsorted integers Read those integers into an array Prompt the user for a search item Search for that item (using sequential search) and report the number of comparisons required. Sort the array. Note that this might take a few minutes. Search for that item again (using binary search) and report the number of comparisons required. You will need to modify both of the search functions to report the number of comparisons that were made during the search. Use your program and the file of 100,000 integers provided here to answer the six questions in the quiz. May i know whats the program please?
C++ LANGUAGE
Search Metrics In this exercise you will explore the performance difference between sequential search and binary search. To do so write a program that performs the following tasks: Prompt the user for a file containing 100,000 unsorted integers Read those integers into an array Prompt the user for a search item Search for that item (using sequential search) and report the number of comparisons required. Sort the array. Note that this might take a few minutes. Search for that item again (using binary search) and report the number of comparisons required. You will need to modify both of the search functions to report the number of comparisons that were made during the search. Use your program and the file of 100,000 integers provided here to answer the six questions in the quiz. May i know whats the program please?
Step by step
Solved in 4 steps with 3 images