and - are merged into -- - also- and - are merged into -- - the result is shown in figure third file is necessary to hold the result of this merge step in the second passthe two -record sequences are merged into -record sequencewhich can be written back to file as shown in figure now the sort is complete of coursemore merge steps would be required to sort larger filesthe number of such steps is proportional to log the merge steps can alternate between two files (file and file in figure internal arrays because the computer' internal memory has room for only three blocksthe merging process must take place in stages let' say there are three arrayscalled arr arr and arr each of which can hold block in the first mergeblock - is read into arr and - is read into arr these two arrays are then mergesorted into arr howeverbecause arr holds only one blockit becomes full before the sort is completed when it becomes fullits contents are written to disk the sort then continuesfilling up arr again this completes the sortand arr is again written to disk the following lists show the details of each of the three mergesorts mergesort read - into arr read - into arr merge into arr write to disk merge into arr write to disk mergesort read - into arr read - into arr merge into arr write to disk merge into arr write to disk mergesort read - into arr read - into arr merge into arr write to disk