subject

python Exercise2 Program Assume that you have n arbitrary numbers in range 1..k. The integers may be repeated. Sort them using the algorithm of O(n) complexity. Also sort them using any other algorithm of your choice. Write a program does both of the following • reads numbers from input file inX. txt, sorts them using O(n) algorithm, and output the sorted numbers to output file outXa. txt (where X is 1, 2, …) • reads numbers again from the same input file, sorts them using any other algorithm of your choice, and output the sorted numbers to output file outXb. txt There are two test input files provided – in10.txt and in100.txt. There is also one sample output file corresponding to the first input file – out10_sample. txt (file out100_sample. txt is not provided). Run your program with the test input files. For each input file, two corresponding output files (produced by your program) have to be the same. Also compare the produced output file out10a. txt with the sample file out10_sample. txt. Submit the test input and the produced output files together with the program source code. You will have a lot of holes in your array, but it is OK, you waste in memory but win in time

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 08:10
Technician a says that if a valve is open when a piston rises to the very top of a cylinder, the piston may actually strike the valve head and cause serious engine damage. technician b says if the camshaft is located in the engine block, then the engine is called an overhead valve engine, ohv engine, or an in-block camshaft. who is right? a. b only b. both a and b c. a only d. neither a nor b
Answers: 3
question
Computers and Technology, 24.06.2019 23:00
Hypertension occurs when blood pressure is too high.
Answers: 1
question
Computers and Technology, 24.06.2019 23:00
Aselect query joins tables together by their a. table names. b. primary keys. c. first entries. d. field names.
Answers: 2
question
Computers and Technology, 25.06.2019 16:00
Which domain suffixes do businesses that sell products and services commonly use?
Answers: 2
You know the right answer?
python Exercise2 Program Assume that you have n arbitrary numbers in range 1..k. The integers may be...
Questions
question
Social Studies, 23.05.2021 04:40
question
Mathematics, 23.05.2021 04:40
question
Mathematics, 23.05.2021 04:40
question
Computers and Technology, 23.05.2021 04:40
question
Physics, 23.05.2021 04:40
question
Mathematics, 23.05.2021 04:40
Questions on the website: 13722363