stuff
This commit is contained in:
15
9-linear-search/README.md
Normal file
15
9-linear-search/README.md
Normal file
@ -0,0 +1,15 @@
|
||||
## Linear Search
|
||||
|
||||
Write a linear search. Start at the front or the back of the array and iterate through until you find the item you're searching for.
|
||||
|
||||
You can use any method of your choice to accomplish this.
|
||||
|
||||
#### Things to consider
|
||||
|
||||
As you're coding, ask yourself...
|
||||
* What is the expected Big-O of this search?
|
||||
* Do I understand this algorithm?
|
||||
* Could I explain it to a 5 year old in less than 5 sentences?
|
||||
|
||||
#### Resources
|
||||
- [Linear Search](http://en.wikipedia.org/wiki/Linear_search)
|
5
9-linear-search/linear.py
Normal file
5
9-linear-search/linear.py
Normal file
@ -0,0 +1,5 @@
|
||||
def linear_search(dataset):
|
||||
pass
|
||||
|
||||
|
||||
arr = [1,3,9,11,23,44,66,88,102,142,188,192,239,382,492,1120,1900,2500,4392,5854,6543,8292,9999,29122]
|
Reference in New Issue
Block a user