上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 33 下一页
摘要: 地址:https://leetcode-cn.com/problems/find-minimum-in-rotated-sorted-array-ii/ <?php /** 154. 寻找旋转排序数组中的最小值 II 假设按照升序排序的数组在预先未知的某个点上进行了旋转。 ( 例如,数组 [0,1, 阅读全文
posted @ 2020-05-09 17:03 花花妹子。 阅读(157) 评论(0) 推荐(0) 编辑
摘要: 地址:https://leetcode-cn.com/problems/xuan-zhuan-shu-zu-de-zui-xiao-shu-zi-lcof/ <?php /** * 面试题11. 旋转数组的最小数字 * 把一个数组最开始的若干个元素搬到数组的末尾,我们称之为数组的旋转。输入一个递增排 阅读全文
posted @ 2020-05-09 16:53 花花妹子。 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 地址:https://leetcode-cn.com/problems/ti-huan-kong-ge-lcof/ <?php /** 面试题05. 替换空格 请实现一个函数,把字符串 s 中的每个空格替换成"%20"。 示例 1: 输入:s = "We are happy." 输出:"We%20a 阅读全文
posted @ 2020-05-09 16:10 花花妹子。 阅读(104) 评论(0) 推荐(0) 编辑
摘要: 地址:https://leetcode-cn.com/problems/zui-xiao-de-kge-shu-lcof/ <?php /** * 面试题40. 最小的k个数 * 输入整数数组 arr ,找出其中最小的 k 个数。例如,输入4、5、1、6、2、7、3、8这8个数字,则最小的4个数字是 阅读全文
posted @ 2020-05-09 15:38 花花妹子。 阅读(150) 评论(0) 推荐(0) 编辑
摘要: 地址:https://leetcode-cn.com/problems/di-yi-ge-zhi-chu-xian-yi-ci-de-zi-fu-lcof/ <?php /** * 在字符串 s 中找出第一个只出现一次的字符。如果没有,返回一个单空格。 * 示例: * * s = "abaccdef 阅读全文
posted @ 2020-05-09 15:15 花花妹子。 阅读(130) 评论(0) 推荐(0) 编辑
摘要: d地址:https://leetcode-cn.com/problems/count-primes/ <?php /** 统计所有小于非负整数 n 的质数的数量。 示例: 输入: 10 输出: 4 解释: 小于 10 的质数一共有 4 个, 它们是 2, 3, 5, 7 。 */ class Sol 阅读全文
posted @ 2020-04-20 18:07 花花妹子。 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 地址:https://leetcode-cn.com/problems/rank-scores/ ## 编写一个 SQL 查询来实现分数排名。 。 示例: 如果两个分数相同,则两个分数排名(Rank)相同。请注意,平分后的下一个名次应该是下一个连续的整数值。换句话说,名次之间不应该有“间隔”。 + 阅读全文
posted @ 2020-04-17 15:34 花花妹子。 阅读(158) 评论(0) 推荐(0) 编辑
摘要: 地址:https://leetcode-cn.com/problems/first-unique-character-in-a-string/ <?php /** 给定一个字符串,找到它的第一个不重复的字符,并返回它的索引。如果不存在,则返回 -1。 案例: s = "leetcode" 返回 0. 阅读全文
posted @ 2020-04-17 14:28 花花妹子。 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 地址:https://leetcode-cn.com/problems/guess-number-higher-or-lower/ <?php /** * 我们正在玩一个猜数字游戏。 游戏规则如下: * 我从 1 到 n 选择一个数字。 你需要猜我选择了哪个数字。 * 每次你猜错了,我会告诉你这个数 阅读全文
posted @ 2020-04-17 11:19 花花妹子。 阅读(265) 评论(0) 推荐(0) 编辑
摘要: 地址:https://leetcode-cn.com/problems/sum-of-two-integers/ <?php /** 不使用运算符 + 和 - ​​​​​​​,计算两整数 ​​​​​​​a 、b ​​​​​​​之和。 示例 1: 输入: a = 1, b = 2 输出: 3 示例 2 阅读全文
posted @ 2020-04-17 11:00 花花妹子。 阅读(122) 评论(0) 推荐(0) 编辑
上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 33 下一页