code: long[] combine(long[][] perturbed) {
  
          int n = perturbed.length;
          int m = perturbed[0].length;
  
          long[] combined = new long[n];
          long[] rotated = new long[m];
  
          for (int i = 0; i < n; i++) {
  
              Arrays.sort(perturbed[i]);
  
              for (int j = 0; j < m; j++) {
                  // if non-unique, then get the next random number
                  if (j > 0 && perturbed[i][j] == perturbed[i][j - 1]) {
                      combined[i] ^= rotated[j] = rotate(rotated[j - 1]);
                  } else {
                      combined[i] ^= rotated[j] = perturbed[i][j];
                  }
              }
  
          }
  
          return combined;
      }
docs: Combines the values in an n x m matrix into a single array of size n.
  This process scans the rows and xors all unique values in the row
  together. If a duplicate value is found it is rotated using a
  pseudorandom number generator.
  
  @param perturbed n x m, matrix
  @return the combined values of each row