We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 692935c commit cb28ab6Copy full SHA for cb28ab6
.gitignore
@@ -1,2 +1,3 @@
1
*.pyc
2
+*.swp
3
.idea/
linear_search.py
@@ -0,0 +1,7 @@
+def linear_search(array: list[int], target: int) -> str:
+ for i in range(len(array)):
+ if array[i] == target:
4
+ return "The {} is in the {} index of the array".format(target, i)
5
+
6
+ return "Your target is not in the array..."
7
0 commit comments