@Override
  public short[] swap(short[] S, int first, int second) {
    short temp = S[first];
    S[first] = S[second];
    S[second] = temp;