logo
logo
AI Products 

C Linear Search (Linear Search) Algorithm

avatar
programlama csharp

Linear search in an array of a simple algorithm that can be used to find whether a specific value.

The lookup value with this algorithm, starting from the last element towards the first element of the array is compared to each value individually.

If the value is close to equal to the value sought, the value of that index is returned.

If the sought value is found equal to the value of minus one (-1) value is returned.

A negative value is returned when the lookup value is not in the array.

The number of elements in the array linear search algorithm less may be preferred.

collect
0
avatar
programlama csharp
guide
Zupyak is the world’s largest content marketing community, with over 400 000 members and 3 million articles. Explore and get your content discovered.
Read more