![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Leetcode
qq_33412699
这个作者很懒,什么都没留下…
展开
-
【Leetcode】54. 螺旋矩阵
问题: 给你一个 m 行 n 列的矩阵 matrix ,请按照 顺时针螺旋顺序 ,返回矩阵中的所有元素。 输入:matrix = [[1,2,3],[4,5,6],[7,8,9]] 输出:[1,2,3,6,9,8,7,4,5] 题解: 法一:遍历第一行元素,填充到结果列表,删除第一行元素,然后把矩阵逆时针翻转,重复此步骤直到获取到所有元素 class Solution: def spiralOrder(self, matrix: List[List[int]]) -> List[int]:原创 2021-03-25 18:45:34 · 74 阅读 · 0 评论 -
【Leetcode】569. 员工薪水中位数
Employee 表包含所有员工。Employee 表有三列:员工Id,公司名和薪水。请编写SQL查询来查找每个公司的薪水中位数。 +-----+------------+--------+ |Id | Company | Salary | +-----+------------+--------+ |1 | A | 2341 | |2 | A | 341 | |3 | A | 15 | |4 | A原创 2021-03-25 18:31:24 · 144 阅读 · 0 评论