Solved

The Following Code Implements a Simple Linear Search

Question 12

Multiple Choice

The following code implements a simple linear search. In [1]: def linear_search(data, search_key) :
) ..: for index, value in enumerate(data) :
) ..: if value == search_key:
) ..: return ***
) ..: return -1
) ..:
) ..:
In the statement return ***, what should replace *** to indicate where the search key was found?


A) data
B) search_key
C) index
D) None of the above

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions