class Solution{
public:
int search(int A[], int l, int h, int key){
//complete the function here
for(int i=0;i<h+1;i++)
{
if(A[i]==key)
{
return i;
}
}
return -1;
}
}.