it is not accepting input of my variable “srch_ele” and always give output -1
@aattuull the problem is in line 33 this should be: for(int i=0;i<n;++i)
for(int i=0;i<n;++i)
@aattuull dont forget to mark your doubt as resolved!