摘要:
You are given annxn2D matrix representing an image.Rotate the image by 90 degrees (clockwise).Follow up:Could you do this in-place?思考:两步,先对角线交换再上下交换。class Solution {public: void rotate(vector > &matrix) { int n=matrix.size(); int i,j; for(i=0;i<n;i++) { for(... 阅读全文
该文被密码保护。 阅读全文