上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 34 下一页
摘要: 地址:https://leetcode-cn.com/problems/na-ying-bi/ <?php /** * Class Solution * 桌上有 n 堆力扣币,每堆的数量保存在数组 coins 中。我们每次可以选择任意一堆,拿走其中的一枚或者两枚,求拿完所有力扣币的最少次数。 示例 阅读全文
posted @ 2020-09-17 16:42 花花妹子。 阅读(108) 评论(0) 推荐(0)
摘要: 地址:https://leetcode-cn.com/problems/delete-middle-node-lcci/ <?php /** * 实现一种算法,删除单向链表中间的某个节点(即不是第一个或最后一个节点),假定你只能访问该节点。 * * * * 示例: * * 输入:单向链表a->b-> 阅读全文
posted @ 2020-09-17 16:31 花花妹子。 阅读(109) 评论(0) 推荐(0)
摘要: 地址:https://leetcode-cn.com/problems/shuffle-the-array/ <?php /** 1470. 重新排列数组 给你一个数组 nums ,数组中有 2n 个元素,按 [x1,x2,...,xn,y1,y2,...,yn] 的格式排列。 请你将数组按 [x1 阅读全文
posted @ 2020-09-17 15:54 花花妹子。 阅读(147) 评论(0) 推荐(0)
摘要: 地址:https://leetcode-cn.com/problems/kids-with-the-greatest-number-of-candies/ <?php /** 1431. 拥有最多糖果的孩子 给你一个数组 candies 和一个整数 extraCandies ,其中 candies[ 阅读全文
posted @ 2020-09-17 15:41 花花妹子。 阅读(102) 评论(0) 推荐(0)
摘要: 地址:https://leetcode-cn.com/problems/number-of-good-pairs/ <?php /** * 1512. 好数对的数目 * 给你一个整数数组 nums 。 * * 如果一组数字 (i,j) 满足 nums[i] == nums[j] 且 i < j ,就 阅读全文
posted @ 2020-09-17 15:16 花花妹子。 阅读(117) 评论(0) 推荐(0)
摘要: 地址:https://leetcode-cn.com/problems/recursive-mulitply-lcci/ <?php /* 面试题 08.05. 递归乘法 递归乘法。 写一个递归函数,不使用 * 运算符, 实现两个正整数的相乘。可以使用加号、减号、位移,但要吝啬一些。 示例1: 输入 阅读全文
posted @ 2020-09-04 16:10 花花妹子。 阅读(150) 评论(0) 推荐(0)
摘要: 地址:https://leetcode-cn.com/problems/baseball-game/ <?php /** 682. 棒球比赛 你现在是棒球比赛记录员。 给定一个字符串列表,每个字符串可以是以下四种类型之一: 1.整数(一轮的得分):直接表示您在本轮中获得的积分数。 2. "+"(一轮 阅读全文
posted @ 2020-08-27 18:27 花花妹子。 阅读(131) 评论(0) 推荐(0)
摘要: 地址:https://leetcode-cn.com/problems/remove-all-adjacent-duplicates-in-string/ <?php /** 1047. 删除字符串中的所有相邻重复项 给出由小写字母组成的字符串 S,重复项删除操作会选择两个相邻且相同的字母,并删除它 阅读全文
posted @ 2020-08-26 16:42 花花妹子。 阅读(150) 评论(0) 推荐(0)
摘要: 地址:https://leetcode-cn.com/problems/remove-outermost-parentheses/ <?php /** 1021. 删除最外层的括号 有效括号字符串为空 ("")、"(" + A + ")" 或 A + B,其中 A 和 B 都是有效的括号字符串,+ 阅读全文
posted @ 2020-08-26 16:29 花花妹子。 阅读(122) 评论(0) 推荐(0)
摘要: 地址:https://leetcode-cn.com/problems/consecutive-numbers/ ## 编写一个 SQL 查询,查找所有至少连续出现三次的数字。 示例: 编写一个 SQL 查询,查找所有至少连续出现三次的数字。 + + + | Id | Num | + + + | 1 阅读全文
posted @ 2020-07-15 19:32 花花妹子。 阅读(170) 评论(0) 推荐(0)
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 34 下一页