Skip to content

Commit 133e591

Browse files
author
Bhrigu Kansra
authored
Merge pull request bhrigukansra#134 from AtieveWadhwa/master
added python linear search
2 parents d0ac895 + 202002c commit 133e591

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
def linsearch(arr, n):
2+
for i in range(len(arr)):
3+
if (arr[i]==n):
4+
return i
5+
return -1

0 commit comments

Comments
 (0)