A is the original array of ints.
B is the sorted array of ints.
C is the hashtable using -1 to indicate unfilled or deleted slots.

For other applications of linear probing, you can't use the same indicator for unfilled and deleted slots, but it works out for this one.

for (int i = 0; i < A.length; i++) {
  // insert into C
  int address = A[i] % C.length;
  for (int j = 0; j < C.length && C[address] != -1; j++) {
    address++;
    if (address == C.length) address = 0;
  }
  if (C[address] != -1) {
    throw RuntimeException("Hash table full");
  }
  C[address] = A[i];
}

for (int i = 0; i < B.length; i++) {
  // delete from C
  int address = B[i] % C.length;
  for (int j = 0; j < C.length && A[i] != C[address]; j++) {
    address++;
    if (address == C.length) address = 0;
  }
  if (A[i] != C[address]) {
    throw RuntimeException("Bad sorting algorithm");
  }
  C[address] = -1;
}