摘要:
Q:You are given annxn2D matrix representing an image.Rotate the image by 90 degrees (clockwise).顺时针90度旋转矩阵。in placeA:分两步走:1.沿着主对角线交换两侧的对称元素,2.交换第j列和第n-1-j列。PS:如果是逆时针旋转,则1.沿着主对角线交换两侧的对称元素,2.交换第i行和第n-1-i行 void rotate(vector > &matrix) { // Start typing your C/C++ solution below // DO ... 阅读全文