Skip to content

fix: grammar mistakes in JSDoc #1127

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

Merged
merged 1 commit into from
Oct 7, 2022
Merged
Changes from all commits
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
8 changes: 4 additions & 4 deletions Search/TernarySearch.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/* Ternary search is similar to binary search but it divide the sorted array
* into three parts and determine which part the key lies in. The array will
/* Ternary search is similar to binary search but it divides the sorted array
* into three parts and determines which part the key lies in. The array will
* be divided into three intervals by using two middle points, mid1 and mid2.
* The value of the key will first compared with the two mid points, the value
* The value of the key will first be compared with the two mid points, the value
* will be returned if there is a match. Then, if the value of the key is less
* than mid1, narrow the interval to the first part. Else, if the value of the
* key is greater than mid2, narrow the interval to the third part. Otherwise,
* narrow the interval to the middle part. Repeat the steps until the value is
* found or the interval is empty(value not found after checking all elements).
* found or the interval is empty (value not found after checking all elements).
*
* Reference: https://www.geeksforgeeks.org/ternary-search/
*/
Expand Down