Problem: Given an array arr of n elements, write a function to search a given element x in arr.
Element found at position 1
The time complexity of the above algorithm is O(n).
Please refer complete article on Linear Search for more details!
GeeksforGeeks has prepared a complete interview preparation course with premium videos, theory, practice problems, TA support and many more features. Please refer Placement 100 for details
- C/C++ Program for Linear Search
- Java Program for Anagram Substring Search (Or Search for all permutations)
- Linear Search vs Binary Search
- Linear Search
- Sentinel Linear Search
- Linear search using Multi-threading
- Java Program for Binary Search (Recursive and Iterative)
- C Program for Binary Search (Recursive and Iterative)
- Recursive program to linearly search an element in a given array
- Search a string in Matrix Using Split function in Java
- Search equal, bigger or smaller in a sorted array in Java
- Repeatedly search an element by doubling it after every successful search
- Why is Binary Search preferred over Ternary Search?
- Java Program for Program to find area of a circle
- Java Program for Program to calculate area of a Tetrahedron