Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

README.md

Linear Search

This program takes an array of size N and a number and checks if the number is present in the array.

Input Format

  • The input consists of three lines.
  • In the first line, there will be a single integer N.
  • In the second line, there will be N space separated integers.
  • In the third line, there will be a single integer, i.e., the number to be searched for in the array

Output Format

A single line containing the search result.

Sample Input

5
1 3 7 5 2
2

Sample Output

2 is present at index 4

Implemented in: