|
| The diagram at left shows a typical partitioning scheme for Straight Merge (sorting 13 elements). Imagine each box represents a portion of the array that is known to be sorted (initially each box contains only one element!). In each merging pass, we merge adjacent sorted areas. In a simple merging algorithm, where the lists are about the same size (as they are here), you compare elements one at a time from the two sorted portions. | ||||||||||||||||||||||||||||||||||||||||||||||||||||