mirror of
https://github.moeyy.xyz/https://github.com/trekhleb/javascript-algorithms.git
synced 2024-09-20 07:43:04 +08:00
Update src/algorithms/search/exponential-search/exponentialSearch.js
Co-authored-by: codacy-production[bot] <61871480+codacy-production[bot]@users.noreply.github.com>
This commit is contained in:
parent
dd1843f0ae
commit
7c132980ab
@ -51,5 +51,5 @@ export default function exponentialSearch(sortedArray, seekElement, comparatorCa
|
|||||||
range *= 2;
|
range *= 2;
|
||||||
}
|
}
|
||||||
// Call binary search for the found range.
|
// Call binary search for the found range.
|
||||||
return binarySearch(sortedArray, range/2, Math.min(range, length - 1), seekElement, comparatorCallback);
|
return binarySearch(sortedArray, range/2, Math.min(range, length - 1), seekElement, comparatorCallback);
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user