Say I have two files or arrays, type doesn't matter, with a size of 184x184. I try to find out if these items are different with a code like below:
for(i=0; i<N; i++) {
x = r.nextInt(184);
y = r.nextInt(184);
if(item1[x,y] != item2[x,y]) {
break;
}
}
My question is, what should the value of N be? Should I run tests, is there a defacto rate between N and the size?
As the program gets out of the loop when it finds differents values for the same index:
As differences will be found in very low values of "i":
So according to my experimentations, defacto value for N is 20. For similar or background is dominant in the pictures the value can be increased up to 100.