刷题
Zachos
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Leetcode-MySQL(180. 连续出现的数字)
编写一个 SQL 查询,查找所有至少连续出现三次的数字。 # Write your MySQL query statement below SELECT distinct a1.Num as ConsecutiveNums from Logs a1,logs b1, logs c1 where a1.Id = b1.Id-1 and c1.Id = b1.Id+1 and a1.Num = b1.Num and b1.Num = c1.Num 点击链接 ...原创 2020-10-09 22:40:10 · 164 阅读 · 0 评论 -
Leetcode-MySQL(183. 从不订购的客户)
从不订购的客户:某网站包含两个表,Customers 表和 Orders 表。编写一个 SQL 查询,找出所有从不订购任何东西的客户。 # Write your MySQL query statement below SELECT Customers.Name as Customers FROM Customers LEFT JOIN orders on Customers.Id <=> orders.CustomerId WHERE orders.CustomerId IS NULL;.原创 2020-10-09 22:37:04 · 180 阅读 · 0 评论 -
Leetcode-MySQL(175. 组合两个表)
组合两个表 # Write your MySQL query statement below SELECT FirstName, LastName, City, State FROM Person LEFT JOIN Address ON Person.PersonId = Address.PersonId原创 2020-10-09 22:35:51 · 127 阅读 · 0 评论 -
Leetcode-MySQL(596. 超过5名学生的课)
超过5名学生的课:有一个courses 表 ,有: student (学生) 和 class (课程)。请列出所有超过或等于5名学生的课。 # Write your MySQL query statement below SELECT class FROM courses GROUP BY class HAVING count(distinct student) >= 5; ...原创 2020-10-09 22:34:39 · 224 阅读 · 0 评论 -
Leetcode-MySQL(595. 大的国家)
大的国家 # Write your MySQL query statement below SELECT name, population, area FROM World WHERE area > 3000000 or population > 25000000;原创 2020-10-09 22:32:55 · 175 阅读 · 0 评论 -
Leetcode_Day10
242.有效字母异位词:给定两个字符串 s 和 t ,编写一个函数来判断 t 是否是 s 的字母异位词。 解题思路:字母异位词就是各个字母的数目相同,而顺序不一致。判断两个字符串里的字母和其出现的次数,然后进行比较是否相等。这是一道微软的面试题,例如,“silent”和“listen”就是字母异位词。 class Solution: def isAnagram(self, s: str, t: str) -> bool: return Counter(s) == Counter原创 2020-07-01 15:37:42 · 166 阅读 · 0 评论
分享