Computers and Technology
Computers and Technology, 27.06.2020 19:01, hayleyl05

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

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 12:40, Emilyvite6251
According to the video what are some tasks petroleum engineers perform check all that apply
Answers: 2
image
Computers and Technology, 23.06.2019 15:00, lopez7512
What is the total resistance in a circuit that contains three 60 ohm resistors connected in a series? a. 20 ohms b. 120 ohms c. 60 ohms d. 180 ohms
Answers: 2
image
Computers and Technology, 24.06.2019 16:00, alexisbeasley2
Which of the following characters is acceptable to use in a filename? ? / – %
Answers: 1
image
Computers and Technology, 24.06.2019 22:00, josephvcarter
Is the process of organizing data to reduce redundancy. a. normalization b. primary keying c. specifying relationships d. duplication
Answers: 1
Do you know the correct answer?
python Exercise2 Program Assume that you have n arbitrary numbers in range 1..k. The integers may be...

Questions in other subjects:

Konu
Mathematics, 20.08.2019 15:20