The Wikipedia article on k-way merges says a loser tree is a better data structure. Let's try that.
The Wikipedia article on k-way merges says a loser tree is a better data structure. Let's try that.