Rotate an n × n matrix a quarter turn clockwise without a second matrix — then think about the non-square case.
Rotate an n × n matrix a quarter turn clockwise without a second matrix — then think about the non-square case.
Opens with the full question.