One of the test cases is not passing

#include
using namespace std;

int binary_search(long long int arr[],long long int m,long long int n){

long long int s=0;
long long int e=n-1;

while(s<=e){
	
	long long int mid=(s+e)/2;

	if(m==arr[mid]){
		return mid;
	}
	else if(mid<m){
		s=mid+1;
	}
	else{
		e=mid-1;
	}

}

return -1;

}

int main(){
long long int n;
cin>>n;

long long int arr[n];

for(int i=0;i<n;i++){
	cin>>arr[i];
}

long long int m;
cin>>m;

cout<<binary_search(arr,m,n);

}

hello @vanshit02

here also u need arr[mid]

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.