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 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 00:30
Which one of the following is the most accurate definition of technology? a electronic tools that improve functionality b electronic tools that provide entertainment or practical value c any type of tool that serves a practical function d any type of tool that enhances communication
Answers: 1
question
Computers and Technology, 24.06.2019 06:30
Some peer-to-peer networks have a server and some don't. true false
Answers: 2
question
Computers and Technology, 24.06.2019 07:30
Jason is working on a microsoft excel worksheet and he wants to create a print preview shortcut. his teacher asks him to access the customization option to create the new shortcut. which two tabs should jason select to place the print preview shortcut on the worksheet toolbar? a. new tab (custom) and new group (custom) b. new file tab (custom) and new tab (custom) c. new custom group and new command d. new custom tab and new command
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
Biology, 01.09.2019 04:30
question
English, 01.09.2019 04:30
Questions on the website: 13722366