Unknown Warning

google
Tags: #<Tag:0x00007f24285eb020>

#1

#define C 1000000007
int Solution::hammingDistance(const vector &A) {
int l=A.size();
int s=0;
for(int i=0;i<32;i++){
int count=0;
for(int j=0;j<l;j++){
//counting no. of 1’s in each array elements starting from LSB To MSB
if(A[j]&(1<<i))
count++;
}
s=((s%C)+(2*(count%C)*((A.size()-count)%C))%C)%C;
}
return s;

}

when i use s=((s%C)+(2*(count%C)*((l-count)%C))%C)%C;
where l is size of array , test cases failed as warning appears that : Your code might be failing for larger test-cases

but it works nice when i use A.size() instead of l