Computers and Technology

Frankie is considering whether to use a binary or linear search in her program to find a value in a sorted list. when she tests the algorithms on selection of short lists of fixed-length lists she finds that the binary search is faster on average than the linear search. another programmer suggests she tests both algorithms on a selection of lists which are 10 times as long as her original test lists. what most likely describes the likely results of this test?

answer
Answers: 1

Similar questions

Предмет
Computers and Technology, 28.06.2019 07:00, chocolateFudge
Requirements - c++ programcreate data filesyou need to manually create at least four text files with random integer values. you don’t need large number of values, which makes testing easier.for example, you can create a file with values: 1 2 3 4 5 6 7 8 9. save it, and make 3 copies. in each copy put a single value of 0: one towards the beginning of file, one around the middle of file, and one towards the end of file. rename the 3 copies with name such as “early.txt”, “middle.txt”, “end.txt”. keep the original one without a the following is the flow of the program -- provide comments for all tasks 1 - 41. read values from filesthe program should, for each file, read the file and put the values into an array at the start of program.2. simple searchimplement a search algorithm for your program that searches for a target value in your four data files. when implemented, the program should first ask for target value and validate user input, then output whether target value is found for each file. use a binary searchexample outputwhat is target value: 0num.txt: target value not foundearly.txt: target value foundmid.txt: target value foundend.txt: target value found3. sortingthere are a lot of sorting algorithms; find a basic one and implement it in your program and cite the sources. when implemented, the program should, for each file, ask user for the output file name, then use the algorithms to sort the values, and finally output the sorted values to the output files. don’t forget to print the sorted values in each file onto the screen as well.4. binary searchfind a basic algorithm for binary search. implement it in the program that searches for target value in your sorted data files from task 3. the operation should be fairly similar to the simple search.
Answers: 2
Do you know the correct answer?
Frankie is considering whether to use a binary or linear search in her program to find a value in a...

Questions in other subjects:

Konu
Mathematics, 17.10.2019 08:50
Konu
Biology, 17.10.2019 08:50