上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 33 下一页
摘要: 地址:https://leetcode-cn.com/problems/how-many-numbers-are-smaller-than-the-current-number/ <?php /** 给你一个数组 nums,对于其中每个元素 nums[i],请你统计数组中比它小的所有数字的数目。 换 阅读全文
posted @ 2020-03-27 09:41 花花妹子。 阅读(211) 评论(0) 推荐(0) 编辑
摘要: 地址:https://leetcode-cn.com/problems/delete-duplicate-emails/ ## 编写一个 SQL 查询,来删除 Person 表中所有重复的电子邮箱,重复的邮箱里只保留 Id 最小 的那个。 示例: + + + | Id | Email | + + + 阅读全文
posted @ 2020-03-26 17:52 花花妹子。 阅读(202) 评论(0) 推荐(0) 编辑
摘要: 地址:https://leetcode-cn.com/problems/reformat-department-table/ ## 编写一个 SQL 查询来重新格式化表,使得新的表中有一个部门 id 列和一些对应 每个月 的收入(revenue)列。 示例: 部门表 Department: + + 阅读全文
posted @ 2020-03-26 17:15 花花妹子。 阅读(228) 评论(0) 推荐(0) 编辑
摘要: 地址:https://leetcode-cn.com/problems/customers-who-never-order/ ## 某网站包含两个表,Customers 表和 Orders 表。编写一个 SQL 查询,找出所有从不订购任何东西的客户。 示例: Customers 表: + + + | 阅读全文
posted @ 2020-03-26 16:55 花花妹子。 阅读(110) 评论(0) 推荐(0) 编辑
摘要: 地址:https://leetcode-cn.com/problems/palindrome-number/ <?php /** 判断一个整数是否是回文数。回文数是指正序(从左向右)和倒序(从右向左)读都是一样的整数。 示例 1: 输入: 121 输出: true 示例 2: 输入: -121 输出 阅读全文
posted @ 2020-03-26 15:36 花花妹子。 阅读(188) 评论(0) 推荐(0) 编辑
摘要: 地址:https://leetcode-cn.com/problems/binary-search/ <?php /** 给定一个 n 个元素有序的(升序)整型数组 nums 和一个目标值 target ,写一个函数搜索 nums 中的 target,如果目标值存在返回下标,否则返回 -1。 示例 阅读全文
posted @ 2020-03-26 14:38 花花妹子。 阅读(110) 评论(0) 推荐(0) 编辑
摘要: 地址:https://leetcode-cn.com/problems/rising-temperature/ ## 给定一个 Weather 表,编写一个 SQL 查询,来查找与之前(昨天的)日期相比温度更高的所有日期的 Id。 示例: 给定一个 Weather 表,编写一个 SQL 查询,来查找 阅读全文
posted @ 2020-03-26 11:20 花花妹子。 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 地址:https://leetcode-cn.com/problems/employees-earning-more-than-their-managers/ ## 编写一个 SQL查询,交换所有的 f 和 m 值(例如,将所有 f 值更改为 m,反之亦然 示例: Employee 表包含所有员工, 阅读全文
posted @ 2020-03-26 10:52 花花妹子。 阅读(187) 评论(0) 推荐(0) 编辑
摘要: 地址:https://leetcode-cn.com/problems/swap-salary/submissions/ ## 编写一个 SQL查询,交换所有的 f 和 m 值(例如,将所有 f 值更改为 m,反之亦然 示例: 给定一个 salary 表,如下所示,有 m = 男性 和 f = 女性 阅读全文
posted @ 2020-03-25 16:04 花花妹子。 阅读(446) 评论(0) 推荐(0) 编辑
摘要: 地址:https://leetcode-cn.com/problems/length-of-last-word/ <?php /** 给定一个仅包含大小写字母和空格 ' ' 的字符串 s,返回其最后一个单词的长度。如果字符串从左向右滚动显示,那么最后一个单词就是最后出现的单词。 如果不存在最后一个单 阅读全文
posted @ 2020-03-25 14:38 花花妹子。 阅读(98) 评论(0) 推荐(0) 编辑
上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 33 下一页