its a program in OPL language. we have to compare all the sub-strings of the array and print that is any intersection is happening between two of the sub-lists or not… but here a prob is showing that it is not accepting the if condition it is directly going to the else part… plzz anyone can solve this prob? and tell me that hoe could i find the common elements by comparing each sub-lists…
{int} R[1..n][1..m]= [ [{1,2,3,4}], [{7,2,3,9}], [{2,9,3,4}], [{2,14,3,16} ] ];
execute
{
for(var x=1; x<=n; x++)
{
for(var y=x+1;y<=n;y++)
{
if(R[x] == R[y])
{
for(var k=y;k<=n;k++)
R[k]= R[k+1];
writeln("array is not null");
}
else
writeln("a is null");
}
}
}