I have n sorted arrays of infinite length.. the arrays are input streams where the data just keeps coming in a sorted order..
I need to consider all elements in the all these sorted arrays and convert them into an infinite stream (array) of one sorted array
Mergging sorted arrays of infinite length
Suppose that the streams are sorted as smallest first. Then at every time when there is at least one unprocessed number in each stream, output the smallest among the first numbers of all the streams.
E.g., suppose the i-th stream is represented as b_i[0,1,2...]. Then always ouput min_i {b_i[0]}, as long as all b_i[0]'s are non-null.