C++ Challenge!! Search Metrics Link to the 100,000 Random Integers: https://1drv.ms/t/s!AuFS4mkcuYyBjHZ_SIudb93bq2uy 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 will take about a minute. 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.
C++ Challenge!!
Search Metrics
Link to the 100,000 Random Integers:
https://1drv.ms/t/s!AuFS4mkcuYyBjHZ_SIudb93bq2uy
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 will take about a minute.
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.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images