Reducing nested loops in C++

209 Views Asked by At
for(int i=1; i<=a;i++){
        for(int j=1;j<=b;j++){
            if((i+j)%2 == 0){
                count++;}}}

Can anyone reduce the Time complexity of this problem? I am finding great difficulty in doing it.

0

There are 0 best solutions below