You are given three data files that contain integer values.Each file has a diffe
ID: 3619153 • Letter: Y
Question
You are given three data files that contain integer values.Each file has a different set of numbers. Each file has its set ofnumbers in sorted order (low to high). Write a program that willread the data for the three files and output one (1) file ofnumbers in sorted order. Example: file A B C File A: 1 15 16 23 51 File B: 0 91 101 122 130 File C: 23 33 34 63 200 Output file: 0 1 15 16 23 32 33 34 51 63 91 101 122 130 200 You are given three data files that contain integer values.Each file has a different set of numbers. Each file has its set ofnumbers in sorted order (low to high). Write a program that willread the data for the three files and output one (1) file ofnumbers in sorted order. Example: file A B C File A: 1 15 16 23 51 File B: 0 91 101 122 130 File C: 23 33 34 63 200 Output file: 0 1 15 16 23 32 33 34 51 63 91 101 122 130 200Explanation / Answer
Use the merge frommergesort to merge to vectors at a time. vectormerge(vector lhs,vector rhs) { vector output; int i= 0; int j= 0; while(iRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.