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 06:00
What role do chromosomes play in inheritance?
Answers: 1
question
Computers and Technology, 22.06.2019 13:50
The instruction ishl (shift left integer) exists in jvm but not in ijvm. it uses the top two values on the stack, replacing the two with a single value, the result. the sec- ond-from-top word of the stack is the operand to be shifted. its content is shifted left by a value between 0 and 31, inclusive, depending on the value of the 5 least signifi- cant bits of the top word on the stack (the other 27 bits of the top word are ignored). zeros are shifted in from the right for as many bits as the shift count. the opcode for ishl is 120 (0x78).a. what is the arithmetic operation equivalent to shifting left with a count of 2? b. extend the microcode to include this instruction as a part of ijv.
Answers: 1
question
Computers and Technology, 23.06.2019 02:30
People with high self-esteem: accept their strengths and weaknesses. believe that failed experiences are failures of their whole self. feel good about who they are only when they reach total success. need positive external experiences to counteract negative feelings that constantly plague them.
Answers: 1
question
Computers and Technology, 23.06.2019 10:00
Whats three fourths of 15(this is supposed to be in math but i clicked too fast)
Answers: 1
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
Biology, 06.05.2021 20:10
question
Biology, 06.05.2021 20:10
question
Mathematics, 06.05.2021 20:10
question
Mathematics, 06.05.2021 20:10
question
Mathematics, 06.05.2021 20:10
Questions on the website: 13722361