(classic problem)
Definition: Given an array A of n elements and a positive integer k ≤ n, find the kth smallest element of A and partition the array such that A[1], ..., A[k-1] ≤ A[k] ≤ A[k+1], ..., A[n].
See also select kth element, Select, MODIFIND, Find.
Note: Algorithms to solve this problem are often used in sort algorithms or to find the median of a set. These can be easily changed to find the kth largest element.
Author: VZ
If you have suggestions, corrections, or comments, please get in touch with Paul E. Black.
Entry modified 28 March 2006.
HTML page formatted Mon Sep 11 09:46:07 2006.
Cite this as:
Vladimir Zabrodsky, "select and partition", in
Dictionary of Algorithms and Data
Structures [online], Paul E. Black, ed.,
U.S. National Institute of
Standards and Technology. 28 March 2006. (accessed TODAY)
Available from: http://www.nist.gov/dads/HTML/selectAndPartition.html