上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 33 下一页
摘要: 地址:https://leetcode-cn.com/problems/search-insert-position/ <?php /** 给定一个排序数组和一个目标值,在数组中找到目标值,并返回其索引。如果目标值不存在于数组中,返回它将会被按顺序插入的位置。 你可以假设数组中无重复元素。 示例 1 阅读全文
posted @ 2020-03-25 11:41 花花妹子。 阅读(222) 评论(0) 推荐(0) 编辑
摘要: 地址:https://leetcode-cn.com/problems/not-boring-movies/ ## 编写一个 SQL查询,找出所有影片描述为非 boring (不无聊) 的并且 id 为奇数 的影片,结果请按等级 rating 排列 示例: 某城市开了一家新的电影院,吸引了很多人过来 阅读全文
posted @ 2020-03-25 09:32 花花妹子。 阅读(301) 评论(0) 推荐(0) 编辑
摘要: 地址:https://leetcode-cn.com/problems/reverse-string/ <?php /** 编写一个函数,其作用是将输入的字符串反转过来。输入字符串以字符数组 char[] 的形式给出。 不要给另外的数组分配额外的空间,你必须原地修改输入数组、使用 O(1) 的额外空 阅读全文
posted @ 2020-03-24 14:05 花花妹子。 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 地址:https://leetcode-cn.com/problems/classes-more-than-5-students/ ## 请列出所有超过或等于5名学生的课。 示例: 有一个courses 表 ,有: student (学生) 和 class (课程)。 请列出所有超过或等于5名学生的 阅读全文
posted @ 2020-03-24 10:46 花花妹子。 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 地址:https://leetcode-cn.com/problems/big-countries/ ## 编写一个SQL查询,输出表中所有大国家的名称、人口和面积。 示例: 这里有张 World 表 + + + + + + | name | continent | area | populatio 阅读全文
posted @ 2020-03-24 09:29 花花妹子。 阅读(204) 评论(0) 推荐(0) 编辑
摘要: 地址:https://leetcode-cn.com/problems/number-of-steps-to-reduce-a-number-to-zero/ <?php /** 给你一个非负整数 num ,请你返回将它变成 0 所需要的步数。 如果当前数字是偶数,你需要把它除以 2 ;否则,减去 阅读全文
posted @ 2020-03-23 17:45 花花妹子。 阅读(411) 评论(0) 推荐(0) 编辑
摘要: 地址:https://leetcode-cn.com/problems/rotate-array/ <?php /** * Created by PhpStorm. * User: huahua * Date: 2020/3/18 * Time: 下午6:23 */ /** 给定一个数组,将数组中的 阅读全文
posted @ 2020-03-23 16:31 花花妹子。 阅读(188) 评论(0) 推荐(0) 编辑
摘要: 地址:https://leetcode-cn.com/problems/second-highest-salary/solution/di-er-gao-de-xin-shui-by-leetcode/ ## 编写一个 SQL 查询,获取 Employee 表中第二高的薪水(Salary) 。 示例 阅读全文
posted @ 2020-03-23 15:31 花花妹子。 阅读(290) 评论(0) 推荐(0) 编辑
摘要: 编写一个 SQL 查询,查找 Person 表中所有重复的电子邮箱。 示例: + + + | Id | Email | + + + | 1 | a@b.com | | 2 | c@d.com | | 3 | a@b.com | + + + 根据以上输入,你的查询应返回以下结果: + + | Emai 阅读全文
posted @ 2020-03-20 10:15 花花妹子。 阅读(237) 评论(0) 推荐(0) 编辑
摘要: 地址:https://leetcode-cn.com/problems/zuo-xuan-zhuan-zi-fu-chuan-lcof/ 代码: <?php /** * Created by PhpStorm. * User: huahua * Date: 2020/3/18 * Time: 下午6 阅读全文
posted @ 2020-03-20 09:43 花花妹子。 阅读(116) 评论(0) 推荐(0) 编辑
上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 33 下一页