Embed presentation
Download to read offline





![Algorithm
Linear Search ( Array A, Value x)
Step 1: Set i to 1
Step 2: if i > n then go to step 7
Step 3: if A[i] = x then go to step 6](https://image.slidesharecdn.com/linearsearchinds-200515073716/75/Linear-search-in-ds-6-2048.jpg)


Linear search is a simple algorithm that sequentially checks each element of a data collection one by one until a match is found or the end is reached. It involves traversing the array using a for loop, comparing the target value to the current array element in each iteration, returning the index if a match occurs or -1 if no match, and explaining its implementation through pseudocode steps. The document provides an overview of linear search and how to implement it through an example and algorithm.





![Algorithm
Linear Search ( Array A, Value x)
Step 1: Set i to 1
Step 2: if i > n then go to step 7
Step 3: if A[i] = x then go to step 6](https://image.slidesharecdn.com/linearsearchinds-200515073716/75/Linear-search-in-ds-6-2048.jpg)

