Searching Linear Get link Facebook X Pinterest Email Other Apps Searching LinearQUESTION DESCRIPTIONWrite a program to search a element linearly a=int(input())l=[]for i in range(0,a): num=int(input()) l.append(num)s=int(input())for i in range(0,a): if s==l[i]: print('Element is present at index',i) Comments
Comments
Post a Comment