摘要: 地址: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) 编辑