Pls help with the following code;always getting true as the output

#include
using namespace std;
bool check(int arr[],int i,int j)
{
if(i>=j)
{
return true;
}
if((arr[i]=arr[j] && check(arr,i+1,j-1))==true)
{
return true;
}
else
{
return false;
}
}
int main()
{
int arr[1000];
int n;
cin>>n;
for(int i=0;i<n;i++)
{
cin>>arr[i];
}
int i=arr[0];
int j=arr[n-1];
if(check(arr,i,j))
{
cout<<“true”;
}
else{
cout<<“false”;
}
return 0;
}

Please save your code on ide.codingblocks.com and then share its link.