Computer Science, asked by kumarnirmal447, 5 months ago

write the python code for Linear search​

Answers

Answered by sanjeevnishu914
2

Answer:

Program

def linear_Search(list1, n, key):

# Searching list1 sequentially.

for i in range(0, n):

if (list1[i] == key):

return i.

return -1.

list1 = [1 ,3, 5, 4, 7, 9]

key = 7.

Explanation:

......

Answered by studyingperson
4

Answer:

def linear_Search(list1, n, key):

def linear_Search(list1, n, key):# Searching list1 sequentially.

def linear_Search(list1, n, key):# Searching list1 sequentially.for i in range(0, n):

Similar questions