subject
Computers and Technology, 06.08.2021 20:10 essie10

For this assignment you have to write a C program that will utilize the merge sort and binary search algorithm. Problem In this assignment, you have to read a text file (in. txt) that contains a set of point coordinates (x, y). The first line of the file contains the number of points (N) and then each line of the file contains x and y values that are separated by space. The value of x and y are integer. They can be both negative and positive numbers. You have to sort those points in x-axis major order and then write the output into another file (out. txt) in the same format, i. e., each line contains one coordinate point and the value of x and y are space delimited. After writing the sorted points in the file, your program should display "sorted and output written". After that your program should prompt the user for an input coordinate point x and y values and your program should perform binary search to determine whether the point exist in the given list of points. If it is found, it should show "Found at record number ". If not, say not found. Sample Input file in. txt: 6 3 4 6 2 5 2 7 5 2 Sample Input file out. txt: 2 5 2 7 4 6 5 2 6 3 "Sorted and output written" Search input (x y): 2 3 Output: Not found Search input (x y): 4 6 Output: Found at record 3 Requirement: You must use file IO, Merge sort and binary search for your solution.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 00:00
Ahorse is how much percent more powerful than a pony
Answers: 1
question
Computers and Technology, 22.06.2019 17:30
1. before plugging in a new device to a computer you should unplug all other devices turn off the computer turn on the computer 2. many of the maintenance tools for a computer can be found in the control panel under administrative tools display personalization
Answers: 1
question
Computers and Technology, 23.06.2019 01:00
Write the command that can be used to answer the following questions. (hint: try each out on the system to check your results.) a. find all files on the system that have the word test" as part of their filename. b. search the path variable for the pathname to the awk command. c. find all files in the /usr directory and subdirectories that are larger than 50 kilobytes in size. d. find all files in the /usr directory and subdirectories that are less than 70 kilobytes in size. e. find all files in the / directory and subdirectories that are symbolic links. f. find all files in the /var directory and subdirectories that were accessed less than 60 minutes ago. g. find all files in the /var directory and subdirectories that were accessed less than six days ago. h. find all files in the /home directory and subdirectories that are empty. i. find all files in the /etc directory and subdirectories that are owned by the group bin."
Answers: 1
question
Computers and Technology, 23.06.2019 07:50
Most shops require the technician to enter a starting and ending time on the repair order to track the actual time the vehicle was in the shop and closed out by the office. this time is referred to as _ time ? a. comeback b. ro c. cycle d. lead
Answers: 1
You know the right answer?
For this assignment you have to write a C program that will utilize the merge sort and binary search...
Questions
question
Chemistry, 02.01.2021 14:00
question
Mathematics, 02.01.2021 14:00
question
Mathematics, 02.01.2021 14:00
question
English, 02.01.2021 14:00
question
Health, 02.01.2021 14:00
question
Mathematics, 02.01.2021 14:00
Questions on the website: 13722360