for (i = 0; i < m, i + +){ for (j = 0; j < n, j + +){ if (a = b){ arr[i][j] = 1; } else{ arr[i][j] = 2; } } } for (i = 0; i < m, i + +){ for (j = 0; j < n, j + +){ arr[i] += arr[i][j]; } } for (i = 0; i < m, i + +){ if (a = b){ p[i] = i q [i] = i } }
for (i = 0; i < m, i + +){ sum = 0; for (j = 0; j < n, j + +){ if (a = b){ arr[i][j] = 1 sum += 1; } else{ arr[i][j] = 2 } } if (c = d){ arr[i] = sum; p[i] = i q [i] = i } }
O(m x n)
if (a = b){ // this store value of b in a
if (a == b){ // this compare a and b for equality
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)