`m[i], m[j] = m[j], m[i]` -- no need for the temporary.