Skip to content

Commit eb99d28

Browse files
Update linear_search.py
1 parent 84222da commit eb99d28

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

searches/linear_search.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,4 @@
11
"""
2-
Linear Search Algorithm
3-
4-
Linear search is a simple searching technique that checks each element in the collection
5-
sequentially until the target element is found or the collection is exhausted.
6-
It is also known as sequential search.
7-
8-
Characteristics:
9-
- Works on both sorted and unsorted collections
10-
- Time complexity: O(n)
11-
- Space complexity: O(1)
12-
- Simple and reliable for small datasets
13-
14-
For large datasets or sorted collections, binary search or other logarithmic search
15-
algorithms are usually more efficient.
16-
172
This is pure Python implementation of linear search algorithm
183
194
For doctests run following command:

0 commit comments

Comments
 (0)