What is linear search in c++?
In the linear search algorithm, we compare each array element with the key until we find the matching key.
code for linear search
#include <iostream>
using namespace std;
// linear search
int linearSearch(int *arr, int n, int key)
{
for (int i = ...
mandlerajeev.hashnode.dev1 min read