摘要: 转置加翻转 思路: 先把矩阵转置,然后把每一行元素翻转。即遍历元素,交换matrix[i][j]和matrix[j][i],然后翻转每一个子数组。 代码: class Solution: def rotate(self, matrix: List[List[int]]) -> None: """ D 阅读全文
posted @ 2020-05-30 11:46 nil_f 阅读(136) 评论(0) 推荐(0)