subject

Write sort. c program, it will be run from the command line as follows:
$ ./sort -s 3 -i numbers. txt -o sorted. txt
$ algorithm: merge sort, #integers: 1024, elapsed time: 0s 333ms
sort: name of your program (executable file name)

-s 3: sorting algorithm to use (see below)
-i numbers. txt: input text file, to be sorted by the program
-o sorted. txt: output text file, sorted numbers are saved to this file
sorting algorithms :
0: bubble sort
1: insertion sort
2: selection sort
3: merge sort
4: heapsort
5: quicksort
you should implement these sorting algorithms in your code; you are not
allowed to use the sorting algorithms in any library.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 07:00
You will be given two character arrays of the same size, one will contain a number of ships. ships will move around the character array based on which way they are facing and the route they are on. routes are given in the other array. the route consists of '-' and '|' for straight paths, '\' and '/' for curves, and '+' for intersections. there are ships on these routes. ships always face a direction, '^' for up, '> ' for right, 'v' for down, and '< ' for left. any time the ships hit a '\' or a '/' it will turn as you would expect a ship to turn (e.g. a '^' that moves into a '/' will turn right). at an intersection, ships will always continue straight through. all ships move at the same speed, ships take turns moving and all ships move during one 'tick'. the one in the most top left goes first, followed by those to its right, then the ones in the next row. it iterates along the rows and then down the columns. each ship moves one space on its turn moving along the route. your function needs to return the position of the first collision between two ships and the number of ticks before the crash occurred.
Answers: 2
question
Computers and Technology, 22.06.2019 22:30
Write a full class definition for a class named player , and containing the following members: a data member name of type string .a data member score of type int .a member function called setname that accepts a parameter and assigns it to name . the function returns no value.a member function called setscore that accepts a parameter and assigns it to score . the function returns no value.a member function called getname that accepts no parameters and returns the value of name .a member function called getscore that accepts no parameters and returns the value of score .this is what i have, aparently this is wrong: class player{private: string name; int score; public: void player: : setname (string n){name =n; }void player: : setscore (int s){score = s; }string player: : getname (){return name; }int player: : getscore (){return score; }};
Answers: 2
question
Computers and Technology, 23.06.2019 02:00
Which software would you use to create a print design? a. illustrator b. audacity c. reaper d. dreamweaver
Answers: 2
question
Computers and Technology, 23.06.2019 03:30
Ihave a singular monitor that is a tv for my computer. recently, i took apart my computer and put it back together. when i put in the hdmi cord and booted the computer to see if it worked, the computer turned on fine but the screen was blue with "hdmi no signal." i've tried everything that doesn't require buying spare parts, any answer is appreciated!
Answers: 1
You know the right answer?
Write sort. c program, it will be run from the command line as follows:
$ ./sort -s 3 -i numb...
Questions
question
Mathematics, 24.03.2021 23:10
question
Geography, 24.03.2021 23:10
question
Mathematics, 24.03.2021 23:10
question
Mathematics, 24.03.2021 23:10
question
Engineering, 24.03.2021 23:10
question
Geography, 24.03.2021 23:10
Questions on the website: 13722361