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.
![Question 1
Not yet answered
Marked out of 1.00
P Flag question
Was search item 20000 found?
Select one:
True
O False
Question 2
Not yet answered
Marked out of 1.00
P Flag question
How many comparisons did sequential search make while searching the list for the
value 20000?
Answer:
Question 3
Not yet answered
Marked out of 1.00
P Flag question
How many comparisons did binary search report in the search for 20000?
Answer:](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F0a3d6711-6348-4a91-a0bd-319e230b0002%2Fae5d7a51-210b-45db-ba11-eebfcad21ce1%2Fvrr365g_processed.png&w=3840&q=75)
![Question 4
Not yet answered
Marked out of 1.00
P Flag question
Was the value 45000 found in this list?
Select one:
O True
False
Question 5
Not yet answered
Marked out of 1.00
P Flag question
How many comparisons were made by sequential search while searching for 45000?
Answer:
Question 6
Not yet answered
Marked out of 1.00
P Flag question
How many comparisons were made by binary search while searching for 45000?
Answer:](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F0a3d6711-6348-4a91-a0bd-319e230b0002%2Fae5d7a51-210b-45db-ba11-eebfcad21ce1%2Fyb1552q_processed.png&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)