Computers and Technology, 15.05.2021 22:30 fezez5304
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
Question text
Was search item 20000 found?
Select one:
True
False
Question 2
How many comparisons did sequential search make while searching the list for the value 20000?
Question 3
How many comparisons did binary search report in the search for 20000?
Question 4
Was the value 45000 found in this list?
Select one:
True
False
Question 5
How many comparisons were made by sequential search while searching for 45000?
Question 6
How many comparisons were made by binary search while searching for 45000?
Answers: 3
Computers and Technology, 23.06.2019 07:00
To produce a starlight effect in her photograph, lina should choose the filter for her camera.
Answers: 1
Computers and Technology, 23.06.2019 14:30
The option enables you to modify a slide element in most presentation applications.
Answers: 2
Computers and Technology, 23.06.2019 22:30
Janice usually works on a particular workbook that contains all business related data. she decides to keep a backup of all the data in a separate workbook. she opens a new workbook to transfer the data. which option should she use to copy all the data from one workbook to another workbook?
Answers: 1
Computers and Technology, 24.06.2019 08:30
@josethesolis i need can anyone text me and follow me
Answers: 1
In this exercise you will explore the performance difference between sequential search and binary se...
Mathematics, 13.04.2020 21:03
History, 13.04.2020 21:03
Mathematics, 13.04.2020 21:03
Mathematics, 13.04.2020 21:04
Mathematics, 13.04.2020 21:04
Mathematics, 13.04.2020 21:04
English, 13.04.2020 21:04
English, 13.04.2020 21:04