Can anybody tell whats wrong with this code


#1

Can anybody tell whats wrong with this code.

sort(A.begin(),A.end());

for(int j=A.size()-1;j>=0;j--)
{
    for(int i=0;i<j;i++)    
    {
        if(abs(A[j]-A[i])==abs(B))
        {
            return 1;
        }
        
        if(abs(A[j]-A[i])<abs(B))
        {
            return 0;
        }
    }
}