K-way merge algorithm: Difference between revisions

Content deleted Content added
No edit summary
Tag: references removed
Removed bullshit reference to paper that claims to solve a problem with linear output size in sub-linear running time.
Tag: references removed
Line 3:
 
== 2-Way Merge ==
A 2-Way Merge, or a binary merge, has been studied extensively due to its key role in [[Merge sort]]. An example of such is the classic merge that appears frequently in merge sort examples. The classic merge outputs the data item with the lowest key at each step; given some sorted lists, it produces a sorted list containing all the elements in any of the input lists, and it does so in time proportional to the sum of the lengths of the input lists. There are algorithms that exist that can operate in better than linear times such as the Hwang-Lin Merging Algorithm.<ref>F.K.Hwang and S. Lin, \A Simple Algorithm for Merging Two Disjoint Linearly Ordered Sets", SIAM Journal on Computing 1 (1972), 31-39.</ref>
 
Denote by A[1..p] and B[1..q] two arrays sorted in increasing order.