filmov
tv
Linear search Algorithm | Basic Searching algorithm

Показать описание
we are going to learn about linear search algorithm. we will be given an array and then we need to find if a given number is present in the array or not. we will use a for loop to traverse the array and access each element of array. Then we will match each element with the number to find. If the number is present then we will print the index of that number otherwise we will print -1