We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3c88735 commit 773e1b0Copy full SHA for 773e1b0
searches/linear_search.py
@@ -1,5 +1,5 @@
1
"""
2
-This is pure Python implementation of linear search algorithm
+This is a pure Python implementation of the linear search algorithm.
3
4
For doctests run following command:
5
python3 -m doctest -v linear_search.py
@@ -11,9 +11,8 @@
11
12
def linear_search(sequence: list, target: int) -> int:
13
"""A pure Python implementation of a linear search algorithm
14
-
15
- :param sequence: a collection with comparable items (as sorted items not required
16
- in Linear Search)
+ :param sequence: a collection with comparable items (sorting is not required for
+ linear search)
17
:param target: item value to search
18
:return: index of found item or -1 if item is not found
19
0 commit comments