《剑指Offer》刷题笔记——面试题29. 顺时针打印矩阵
难度:简单 一、题目描述: 二、解题分析: 1、leetcode解析 2、代码实现 class Solution: def spiralOrder(self, matrix: List[List[int]]) -> List[int]: if not matrix:return [] m,n = len(matrix),len(matrix[0]) x = y = di = 0 dx = [0,1,0,-1] dy = [1,0,-1,0] res = [] visite
下载地址
用户评论