Selection Algorithm - Selecting K Smallest or Largest Elements

Selecting K Smallest or Largest Elements

Another fundamental selection problem is that of selecting the k smallest or k largest elements, which is particularly useful where we want to present just the "top k" of an unsorted list, such as the top 100 corporations by gross sales. This is also commonly called partial sorting.

Read more about this topic:  Selection Algorithm

Famous quotes containing the words selecting, smallest, largest and/or elements:

    “But compared with the task of selecting a piece of French pastry held by an impatient waiter a move in chess is like reaching for a salary check in its demand on the contemplative faculties.”
    —Robert Benchley (1889–1945)

    “Consider what you have in the smallest chosen library. A company of the wisest and wittiest men that could be picked out of all civil countries in a thousand years have set in best order the results of their learning and wisdom. The men themselves were hid and inaccessible, solitary, impatient of interruption, fenced by etiquette; but the thought which they did not uncover in their bosom friend is here written out in transparent words to us, the strangers of another age.”
    —Ralph Waldo Emerson (1803–1882)

    “The largest pond is as sensitive to atmospheric changes as the globule of mercury in its tube.”
    —Henry David Thoreau (1817–1862)

    “The Laws of Nature are just, but terrible. There is no weak mercy in them. Cause and consequence are inseparable and inevitable. The elements have no forbearance. The fire burns, the water drowns, the air consumes, the earth buries. And perhaps it would be well for our race if the punishment of crimes against the Laws of Man were as inevitable as the punishment of crimes against the Laws of Nature—were Man as unerring in his judgments as Nature.”
    —Henry Wadsworth Longfellow (1807–1882)