subject
Computers and Technology, 06.05.2020 03:43 leekkk

Write a program to sort an array as follows. a. Use insertion sort to sort the array. Print the number of comparisons and the number of item movements. b. Use Shellsort to sort the array using the function shellSort given in this chapter. Print the number of comparisons and the number of item movements. c. Test your program on a list of 1,000 elements and on a list of 10,000 elements.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 08:40
1. the program must provide following functions to extract some statistics. note that the data_list parameter specified in these functions may be the same for all functions or different for different functions—that is your choice. a skeleton file is provided on mirmir. a) open_file()prompts the user to enter a year number for the data file. the program will check whether the year is between 1990 and 2015 (both inclusive). if year number is valid, the program will try to open data file with file name ‘year.txt’, where is the year. appropriate error message should be shown if the data file cannot be opened or if the year number is invalid. this function will loop until it receives proper input and successfully opens the file. it returns a file pointer and year. i. hint: use string concatenation to construct the file name b) read_file(fp)has one parameter, a file pointer read. this function returns a list of your choosing containing data you need for other parts of this project. c) find_average(data_list) takes a list of data (of some organization of your choosing) and returns the average salary. the function does not print anything. hints: i. this is not the average of the last column of data. it is not mathematically valid to find an average by finding the average of averages—for example, in this case there are many more in the lowest category than in the highest category. ii. how many wage earners are considered in finding the average (denominator)
Answers: 1
question
Computers and Technology, 23.06.2019 21:30
Enzo’s balance sheet for the month of july is shown. enzo’s balance sheet (july 2013) assets liabilities cash $600 credit card $4,000 investments $500 student loan $2,500 house $120,000 mortgage $80,000 car $6,000 car loan $2,000 total $127,100 total $88,500 which expression finds enzo’s net worth?
Answers: 1
question
Computers and Technology, 24.06.2019 05:30
Someone plzz me which of these defines a social search? a. asking a search engine a question that is answered by a real person on the other sideb. modifying search results based on popularity of a web pagec.modifying search results based on a ranking of a web page
Answers: 2
question
Computers and Technology, 24.06.2019 08:10
Where are american poets found in the dewey decimal system
Answers: 1
You know the right answer?
Write a program to sort an array as follows. a. Use insertion sort to sort the array. Print the numb...
Questions
question
Mathematics, 04.11.2020 17:10
question
Mathematics, 04.11.2020 17:10
question
Mathematics, 04.11.2020 17:10
question
History, 04.11.2020 17:10
question
Computers and Technology, 04.11.2020 17:10