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:
GohJunLe 2022-09-03 17:21:27 +08:00 committed by GitHub
parent dd1843f0ae
commit 7c132980ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -51,5 +51,5 @@ export default function exponentialSearch(sortedArray, seekElement, comparatorCa
range *= 2;
}
// 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);
}