subject

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: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 21:00
If you have a lien on your vehicle, you cannot apply for a duplicate copy of your vehicle’s certificate of title. true or false
Answers: 1
question
Computers and Technology, 22.06.2019 15:50
The file sales data.xlsx contains monthly sales amounts for 40 sales regions. write a sub that uses a for loop to color the interior of every other row (rows 3, 5, etc.) gray. color only the data area, columns a to m. (check the file colors in excel.xlsm to find a nice color of gray.)
Answers: 2
question
Computers and Technology, 22.06.2019 16:20
It policy compliance and emerging technologies respond to the following: propose at least three control measures that organizations need to put in place to ensure that they remain complaint with emerging technologies and in a continually changing it environment. examine the correlation of effective configuration management and change control procedures to remain compliant with emerging technologies and it security changes.
Answers: 2
question
Computers and Technology, 23.06.2019 03:00
Your business be in google top rank.more the rank more the business leads.for best seo and digital marketing services be confident to contact you can get best seo solutions by assistance experts provide digital marketing, website development, seo expert services and social media internet seo expert services your branding solutions. seo expert services ,best seo expert services,online seo expert services,
Answers: 3
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, 16.08.2020 21:01
question
Chemistry, 16.08.2020 21:01
question
Mathematics, 16.08.2020 21:01
question
German, 16.08.2020 21:01
question
Mathematics, 16.08.2020 21:01
question
Mathematics, 16.08.2020 21:01
question
English, 16.08.2020 21:01
question
Biology, 16.08.2020 21:01
question
World Languages, 16.08.2020 21:01
question
Mathematics, 16.08.2020 21:01
Questions on the website: 13722363