Patent 7908283 was granted and assigned to Red Hat on March, 2011 by the United States Patent and Trademark Office.
The k first elements from an unordered list of n total elements are copied to a result buffer, wherein k is a value smaller than n. The k first elements in the result buffer are sorted. Each subsequent element in the unordered list is compared to elements in the result buffer. If the subsequent element belongs in the result buffer, a current element in the result buffer is replaced with the subsequent element. The elements in the result buffer are then resorted.