上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 33 下一页
摘要: 地址: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 花花妹子。 阅读(111) 评论(0) 推荐(0) 编辑
摘要: 地址:https://leetcode-cn.com/problems/recursive-mulitply-lcci/ <?php /* 面试题 08.05. 递归乘法 递归乘法。 写一个递归函数,不使用 * 运算符, 实现两个正整数的相乘。可以使用加号、减号、位移,但要吝啬一些。 示例1: 输入 阅读全文
posted @ 2020-09-04 16:10 花花妹子。 阅读(146) 评论(0) 推荐(0) 编辑
摘要: 地址:https://leetcode-cn.com/problems/baseball-game/ <?php /** 682. 棒球比赛 你现在是棒球比赛记录员。 给定一个字符串列表,每个字符串可以是以下四种类型之一: 1.整数(一轮的得分):直接表示您在本轮中获得的积分数。 2. "+"(一轮 阅读全文
posted @ 2020-08-27 18:27 花花妹子。 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 地址:https://leetcode-cn.com/problems/remove-all-adjacent-duplicates-in-string/ <?php /** 1047. 删除字符串中的所有相邻重复项 给出由小写字母组成的字符串 S,重复项删除操作会选择两个相邻且相同的字母,并删除它 阅读全文
posted @ 2020-08-26 16:42 花花妹子。 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 地址:https://leetcode-cn.com/problems/remove-outermost-parentheses/ <?php /** 1021. 删除最外层的括号 有效括号字符串为空 ("")、"(" + A + ")" 或 A + B,其中 A 和 B 都是有效的括号字符串,+ 阅读全文
posted @ 2020-08-26 16:29 花花妹子。 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 地址:https://leetcode-cn.com/problems/consecutive-numbers/ ## 编写一个 SQL 查询,查找所有至少连续出现三次的数字。 示例: 编写一个 SQL 查询,查找所有至少连续出现三次的数字。 + + + | Id | Num | + + + | 1 阅读全文
posted @ 2020-07-15 19:32 花花妹子。 阅读(161) 评论(0) 推荐(0) 编辑
摘要: 地址:https://leetcode-cn.com/problems/maximum-lcci/ <?php /** 编写一个方法,找出两个数字a和b中最大的那一个。不得使用if-else或其他比较运算符。 示例: 输入: a = 1, b = 2 输出: 2 */ class Solution 阅读全文
posted @ 2020-07-15 17:08 花花妹子。 阅读(187) 评论(0) 推荐(0) 编辑
摘要: 地址:https://leetcode-cn.com/problems/hamming-distance/ <?php /** 两个整数之间的汉明距离指的是这两个数字对应二进制位不同的位置的数目。 给出两个整数 x 和 y,计算它们之间的汉明距离。 注意: 0 ≤ x, y < 231. 示例: 输 阅读全文
posted @ 2020-07-15 16:58 花花妹子。 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 地址:https://leetcode-cn.com/problems/convert-binary-number-in-a-linked-list-to-integer/ <?php /** 给你一个单链表的引用结点 head。链表中每个结点的值不是 0 就是 1。已知此链表是一个整数数字的二进制 阅读全文
posted @ 2020-07-15 16:43 花花妹子。 阅读(123) 评论(0) 推荐(0) 编辑
摘要: 地址:https://leetcode-cn.com/problems/xor-operation-in-an-array/ <?php /** 给你两个整数,n 和 start 。 数组 nums 定义为:nums[i] = start + 2*i(下标从 0 开始)且 n == nums.len 阅读全文
posted @ 2020-06-28 17:16 花花妹子。 阅读(371) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 33 下一页