sweep.c: swap rows/columns instead of using indirection for last_col