You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enter N elements in an array and enter the key. Find if key is present in the array, if present print the index.
INPUT
10
4 87 9 41 2 3 76 51 7 10
2
OUTPUT
4
EXPLANATION
- sequential search algorithm that starts at one end and goes through each element of a array until the desired element is found, otherwise the search continues till the end of the array.