suppose you have two text files that contain sequences of integers spearated by white space (blank space, tabs, and line breaks). The integers in both files appear in sorted order, with smaller values near the beginning of the file and large values closer to the end. Write a pseudocode alogrithm that merges the two sequences into a single sorted sequence that is written to a third file. Solution N : the number of input files Buffer: an array of records, s: index to buffer stop: a flag idicating if merging stops open N input files and 1 output file loop from i = 1 to N if file is not empty Buffer[i] <- + 0 else read elements from the file i into Buffer[i] pass this Buffer to mergesort function for sorting func mergesort( Buffer ) if ( n == 1 ) return Buffer var l1 as array = Buffer[0] ... Buffer[n/2] var l2 as array = Buffer[n/2+1] ... Buffer[n] l1 = mergesort( l1 ) l2 = mergesort( l2 ) return merge( l1, l2 ) end func func merge( var a as array, var b as array ) var c as array while ( a and b have elements ) if ( a[0] > b[0] ) add b[0] to the end of c remove b[0] from b else add a[0] to the end of c remove a[0] from a while ( a has elements ) add a[0] to the end of c remove a[0] from a while ( b has elements ) add b[0] to the end of c remove b[0] from b return c end func loop from i=1 to N if file is empty write elements from Buffer[i] to output file else outputfile <- +Buffer[i] close files .