Algorithms icon indicating copy to clipboard operation
Algorithms copied to clipboard

Add Linear Search Algorithm

Open binnn228 opened this issue 3 years ago • 1 comments
trafficstars

binnn228 avatar Aug 09 '22 03:08 binnn228

I would like to help :-)

mohitchakraverty avatar Aug 11 '22 18:08 mohitchakraverty

Mam Could i do this task.

drashan14 avatar Oct 13 '22 16:10 drashan14

Please assign this task to me

yashpaddalwar avatar Oct 16 '22 09:10 yashpaddalwar

We don't need this algorithm, it's trivial to implement with just a for loop:

int key = ...;
for (int i = 0; i < n; i++)
  if (array[i] == key)
    return i;

williamfiset avatar Oct 18 '22 00:10 williamfiset