Rotate the square matrix in a clockwise direction, ensuring not to create an additional matrix.

Interview question asked to iOS Engineers interviewing at Wayfair, DocuSign, Meta and others: Rotate the square matrix in a clockwise direction, ensuring not to create an additional matrix..