Computer Science, asked by parwatipanicker, 1 year ago

program of linear search???


QGP: Which Programming Language do you want it in?
QGP: Or are you just looking for Pseudocode?
dasdimona: i think he is looking for pseudocode

Answers

Answered by dasdimona
1

_______________________________

hey here is your answer...

I have given two pic...pls refer it

Attachments:

parwatipanicker: hey dude it seems to be complicated ... suggest any other meathod to do it by using iostream.h!!!
dasdimona: now see my answer
parwatipanicker: thanks dude btw
dasdimona: welcome
Answered by AnonymousKSB
1

Answer:

In python:

Explanation:

let, ele=element u r searching

//used for comment

def linear_search(list,ele):

for i in list:

if i==ele:

return ele

else:

return -1//if ele not found

list=input().split()

ele=eval(input())

print(linear_search(list,ele))

yrr mark it as brainliest ,sacchi me poora program likha h....!


AnonymousKSB: i also want to go abroad
parwatipanicker: hey ur an IITn dont wanna go abroad??
parwatipanicker: COOL MAN
parwatipanicker: WILL MEET
AnonymousKSB: I'LL DATE U
AnonymousKSB: cool na
parwatipanicker: LETS SEE
parwatipanicker: LOL
AnonymousKSB: ha ha
parwatipanicker: HAHA
Similar questions