//temp array is storing frequency of input numbers. ‘min’ and ‘max’ are minimum and maximum numbers in input //array.
for(i=min; i<=max ; i++)
{
for(j=min; j<=max ; j++){
if(j>temp[i]) break;
a=i; b=j;
if(b<=temp[a] && a<=temp[b])
{
count++;
}
}
THIS is giving AC whereas the code below is giving WA. Can anyone tell me the difference between the
two??
for(i=min; i<=max ; i++)
{
for(j=min; j<=temp[i] ; j++){
a=i; b=j;
if(b<=temp[a] && a<=temp[b])
{
count++;
}
}