fix binary search typo (#1079)

Co-authored-by: Oleksii Trekhleb <trehleb@gmail.com>
This commit is contained in:
irene (Irene Tomaini) 2024-03-09 17:11:53 +01:00 committed by GitHub
parent 729bc4d78a
commit 8959566a36
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -11,7 +11,7 @@ import Comparator from '../../../utils/comparator/Comparator';
export default function binarySearch(sortedArray, seekElement, comparatorCallback) {
// Let's create comparator from the comparatorCallback function.
// Comparator object will give us common comparison methods like equal() and lessThen().
// Comparator object will give us common comparison methods like equal() and lessThan().
const comparator = new Comparator(comparatorCallback);
// These two indices will contain current array (sub-array) boundaries.