private static void swap(int i, int k) { var currentI = A[i]; var currentK = A[k]; A[i] = currentK; A[k] = currentI; }