Added the rotate matrix implementation while keeping the array in-place