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 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, 22.06.2019 20:00
Amanda needs to create an informative print brochure for her local library’s fundraiser dinner. what critical detail must she have before she starts designing the brochure?
Answers: 1
question
Computers and Technology, 22.06.2019 21:00
Which of these is most responsible for differences between the twentieth century to the twenty-first century?
Answers: 2
question
Computers and Technology, 23.06.2019 11:00
What is the name of the sound effect that danny hears
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
Mathematics, 21.02.2021 03:50
question
Biology, 21.02.2021 03:50
Questions on the website: 13722366