Content deleted Content added
→K-way merging: -repetition |
|||
Line 21:
<div style="margin-left: 35px; width: 600px">
{{framebox|blue}}
* Build a min-heap {{mvar|h}} of the {{mvar|k}} sequences, using the first element as the key.
* While any of the sequences is non-empty:
Line 36 ⟶ 35:
<div style="margin-left: 35px; width: 600px">
{{framebox|blue}}
* If {{math|''k'' {{=}} 1}}, output the single input sequence.
* If {{math|''k'' {{=}} 2}}, perform a binary merge.
|