Efficiency How much time it takes for our program to run.
def linearSearch(L, x):
for e in L:
if e == x:
The function iterates elements in list L, if the element is equals to x, it returns true. This function continues to iterate until x is found, or if not found, returns false. There are two extreme cases here, if x happens to be … Continue reading 6.00.1x Week 5 (Incomplete)