export declare type Item = number | string; /** * Iteratively search an array of sorted items for a target item and returns its index. * * Time complexity: * - for an array of numbers: O(log(n)), * - for an array of strings: O(m*log(n)), * - where n is the number of array elements and m is the average string length. * * Space complexity: O(1) * * @param arr - Sorted array of numbers or strings to be searched * @param target - Number or string to be searched for * @return index of target in array (or -1 if target is not found) */ export declare const binarySearchIterative: (arr: Item[], target: Item) => number; /** * Recursively search an array of sorted items for a target item and returns its index. * * Time complexity: * - for an array of numbers: O(log(n)), * - for an array of strings: O(m*log(n)), * - where n is the number of array elements and m is the average string length. * * Space complexity: O(log(n)) * * @param arr - Sorted array of numbers or strings to be searched * @param target - Number or string to be searched for * @return index of target in array (or -1 if target is not found) */ export declare const binarySearchRecursive: (arr: Item[], target: Item) => number; //# sourceMappingURL=binary-search.d.ts.map