Added Binary Search and Modified Linear Search
This commit is contained in:
@@ -1,10 +1,3 @@
|
||||
def search_linear(x,y):
|
||||
n = len( x )
|
||||
for i in range(n):
|
||||
if theValue[i] == y:
|
||||
return True
|
||||
return false
|
||||
|
||||
def sequentialSearch(alist, item):
|
||||
pos = 0
|
||||
found = False
|
||||
|
||||
Reference in New Issue
Block a user