Image rotation by 90 degree

Like N X N array 90 degree rotation without using any extra space, is it possible for M X N array with same conditions or we do require an extra array?

Yes it is possible with M*N