Skip to content

Commit 95ff389

Browse files
Added Linear Search Readme
1 parent 9b9e4cd commit 95ff389

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

README.md

+14-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,18 @@ __Properties__
7777
## Search Algorithms
7878

7979
### Linear
80-
Add comments here
80+
![alt text][linear-image]
81+
82+
From [Wikipedia][linear-wiki]: linear search or sequential search is a method for finding a target value within a list. It sequentially checks each element of the list for the target value until a match is found or until all the elements have been searched.
83+
Linear search runs in at worst linear time and makes at most n comparisons, where n is the length of the list.
84+
85+
__Properties__
86+
* Worst case performance O(n)
87+
* Best case performance O(1)
88+
* Average case performance O(n)
89+
* Worst case space complexity O(1) iterative
90+
91+
8192

8293
## Ciphers
8394

@@ -113,3 +124,5 @@ Mathematically a bijective function is used on the characters' positions to encr
113124
[selection-wiki]: https://en.wikipedia.org/wiki/Selection_sort
114125
[selection-image]: https://upload.wikimedia.org/wikipedia/commons/thumb/b/b0/Selection_sort_animation.gif/250px-Selection_sort_animation.gif "Selection Sort Sort"
115126
[caesar]: https://upload.wikimedia.org/wikipedia/commons/4/4a/Caesar_cipher_left_shift_of_3.svg
127+
[linear-wiki]: https://en.wikipedia.org/wiki/Linear_search
128+
[linear-image]: http://www.tutorialspoint.com/data_structures_algorithms/images/linear_search.gif

0 commit comments

Comments
 (0)