Merge Sort - Natural Merge Sort

Natural Merge Sort

A natural merge sort is similar to a bottom up merge sort except that any naturally occurring runs (sorted sequences) in the input are exploited. In the bottom up merge sort, the starting point assumes each run is one item long. In practice, random input data will have many short runs that just happen to be sorted. In the typical case, the natural merge sort may not need as many passes because there are fewer runs to merge. For example, in the best case, the input is already sorted (i.e., is one run), so the natural merge sort need only make one pass through the data.

Read more about this topic:  Merge Sort

Famous quotes containing the words natural, merge and/or sort:

    I do not approve of anything that tampers with natural ignorance. Ignorance is like a delicate exotic fruit; touch it and the bloom is gone.
    Oscar Wilde (1854–1900)

    We don’t know when our name came into being or how some distant ancestor acquired it. We don’t understand our name at all, we don’t know its history and yet we bear it with exalted fidelity, we merge with it, we like it, we are ridiculously proud of it as if we had thought it up ourselves in a moment of brilliant inspiration.
    Milan Kundera (b. 1929)

    Rice and peas fit into that category of dishes where two ordinary foods, combined together, ignite a pleasure far beyond the capacity of either of its parts alone. Like rhubarb and strawberries, apple pie and cheese, roast pork and sage, the two tastes and textures meld together into the sort of subtle transcendental oneness that we once fantasized would be our experience when we finally found the ideal mate.
    John Thorne, U.S. cookbook writer. Simple Cooking, “Rice and Peas: A Preface with Recipes,” Viking Penguin (1987)