Skip to content

Commit b71815d

Browse files
authored
Fix grammar mistakes in JSDoc (TheAlgorithms#1127)
1 parent 9a3d64c commit b71815d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Diff for: Search/TernarySearch.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
/* Ternary search is similar to binary search but it divide the sorted array
2-
* into three parts and determine which part the key lies in. The array will
1+
/* Ternary search is similar to binary search but it divides the sorted array
2+
* into three parts and determines which part the key lies in. The array will
33
* be divided into three intervals by using two middle points, mid1 and mid2.
4-
* The value of the key will first compared with the two mid points, the value
4+
* The value of the key will first be compared with the two mid points, the value
55
* will be returned if there is a match. Then, if the value of the key is less
66
* than mid1, narrow the interval to the first part. Else, if the value of the
77
* key is greater than mid2, narrow the interval to the third part. Otherwise,
88
* narrow the interval to the middle part. Repeat the steps until the value is
9-
* found or the interval is empty(value not found after checking all elements).
9+
* found or the interval is empty (value not found after checking all elements).
1010
*
1111
* Reference: https://www.geeksforgeeks.org/ternary-search/
1212
*/

0 commit comments

Comments
 (0)