/** * Selects the k-th smallest element in an array using the Floyd-Rivest algorithm * (Floyd & Rivest, 1975). Uses Hoare's two-pointer partition scheme and random * sampling to achieve O(n) expected time, avoiding the O(n²) worst case of * deterministic midpoint-pivot quickselect. * * @method introselect * @memberof ran.algorithms * @param {number[]} values Array of values to select from. * @param {number} k The index of the item to select (0-based). * @return {number} The k-th smallest element. * @throws {Error} If k is out of range. * @private */ export default function introselect(values: number[], k: number): number;