Does the sequential pass of the buffers have to be done first?
Yes.
Perhaps the more important question is in the nature of the items.
I think I mentioned "call them numbers". The point is that they are fixed length records; so even if there are multiple numbers, or a string, the comparison function will be very simple, so not much mileage there.
I got the impression your data was all in memory however.
Indeed. Whilst the data originates on disk and is bigger than memory; the two buffers being merged here are both fully in memory, but combined are close to the limits of memory, hence not enough space to perform the n-way merge.
In reply to Re^2: [OT] A measure of 'sortedness'?
by BrowserUk
in thread [OT] A measure of 'sortedness'?
by BrowserUk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |