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