From 820492a8a8bd8332a9ab34649d9c405b68e56e5a Mon Sep 17 00:00:00 2001 From: GohJunLe <108907711+GohJunLe@users.noreply.github.com> Date: Sat, 3 Sep 2022 17:21:39 +0800 Subject: [PATCH] Update src/algorithms/search/exponential-search/exponentialSearch.js Co-authored-by: codacy-production[bot] <61871480+codacy-production[bot]@users.noreply.github.com> --- src/algorithms/search/exponential-search/exponentialSearch.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/algorithms/search/exponential-search/exponentialSearch.js b/src/algorithms/search/exponential-search/exponentialSearch.js index 7a0ff056..1249a238 100644 --- a/src/algorithms/search/exponential-search/exponentialSearch.js +++ b/src/algorithms/search/exponential-search/exponentialSearch.js @@ -45,7 +45,7 @@ export default function exponentialSearch(sortedArray, seekElement, comparatorCa if (comparator.equal(sortedArray[0], seekElement)) return 0; } - // Find range for binary search by repeated doubling + // Find range for binary search by repeated doubling let range = 1; while (range < length && comparator.lessThanOrEqual(sortedArray[range], seekElement)) { range *= 2;