Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix binary search typo #1079

Merged
merged 2 commits into from
Mar 9, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix binary search typo
ir3ne committed Oct 4, 2023
commit f2e690f35d15a8816d8990fb24745efc0971a5c3
2 changes: 1 addition & 1 deletion src/algorithms/search/binary-search/binarySearch.js
Original file line number Diff line number Diff line change
@@ -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.