Apple interview question

how to rotate a Matrix rotation problem