Skip to content

Commit

Permalink
fix binary search typo (#1079)
Browse files Browse the repository at this point in the history
Co-authored-by: Oleksii Trekhleb <trehleb@gmail.com>
  • Loading branch information
ir3ne and trekhleb authored Mar 9, 2024
1 parent 729bc4d commit 8959566
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/algorithms/search/binary-search/binarySearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 8959566

Please sign in to comment.