上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 34 下一页
摘要: di地址:https://leetcode-cn.com/problems/subtract-the-product-and-sum-of-digits-of-an-integer/ <?php /** 给你一个整数 n,请你帮忙计算并返回该整数「各位数字之积」与「各位数字之和」的差。 示例 1: 阅读全文
posted @ 2020-03-27 11:58 花花妹子。 阅读(248) 评论(0) 推荐(0)
摘要: 地址:https://leetcode-cn.com/problems/guess-numbers/ <?php /** 小A 和 小B 在玩猜数字。小B 每次从 1, 2, 3 中随机选择一个,小A 每次也从 1, 2, 3 中选择一个猜。他们一共进行三次这个游戏,请返回 小A 猜对了几次? 输入 阅读全文
posted @ 2020-03-27 11:44 花花妹子。 阅读(177) 评论(0) 推荐(0)
摘要: d地址:https://leetcode-cn.com/problems/remove-duplicates-from-sorted-array/ <?php /** 给定一个排序数组,你需要在 原地 删除重复出现的元素,使得每个元素只出现一次,返回移除后数组的新长度。 不要使用额外的数组空间,你必 阅读全文
posted @ 2020-03-27 11:13 花花妹子。 阅读(137) 评论(0) 推荐(0)
摘要: 地址:https://leetcode-cn.com/problems/intersection-of-two-arrays/ <?php /** 给定两个数组,编写一个函数来计算它们的交集。 示例 1: 输入: nums1 = [1,2,2,1], nums2 = [2,2] 输出: [2] 示例 阅读全文
posted @ 2020-03-27 10:19 花花妹子。 阅读(125) 评论(0) 推荐(0)
摘要: 地址:https://leetcode-cn.com/problems/how-many-numbers-are-smaller-than-the-current-number/ <?php /** 给你一个数组 nums,对于其中每个元素 nums[i],请你统计数组中比它小的所有数字的数目。 换 阅读全文
posted @ 2020-03-27 09:41 花花妹子。 阅读(224) 评论(0) 推荐(0)
摘要: 地址:https://leetcode-cn.com/problems/delete-duplicate-emails/ ## 编写一个 SQL 查询,来删除 Person 表中所有重复的电子邮箱,重复的邮箱里只保留 Id 最小 的那个。 示例: + + + | Id | Email | + + + 阅读全文
posted @ 2020-03-26 17:52 花花妹子。 阅读(209) 评论(0) 推荐(0)
摘要: 地址:https://leetcode-cn.com/problems/reformat-department-table/ ## 编写一个 SQL 查询来重新格式化表,使得新的表中有一个部门 id 列和一些对应 每个月 的收入(revenue)列。 示例: 部门表 Department: + + 阅读全文
posted @ 2020-03-26 17:15 花花妹子。 阅读(238) 评论(0) 推荐(0)
摘要: 地址:https://leetcode-cn.com/problems/customers-who-never-order/ ## 某网站包含两个表,Customers 表和 Orders 表。编写一个 SQL 查询,找出所有从不订购任何东西的客户。 示例: Customers 表: + + + | 阅读全文
posted @ 2020-03-26 16:55 花花妹子。 阅读(115) 评论(0) 推荐(0)
摘要: 地址:https://leetcode-cn.com/problems/palindrome-number/ <?php /** 判断一个整数是否是回文数。回文数是指正序(从左向右)和倒序(从右向左)读都是一样的整数。 示例 1: 输入: 121 输出: true 示例 2: 输入: -121 输出 阅读全文
posted @ 2020-03-26 15:36 花花妹子。 阅读(211) 评论(0) 推荐(0)
摘要: 地址:https://leetcode-cn.com/problems/binary-search/ <?php /** 给定一个 n 个元素有序的(升序)整型数组 nums 和一个目标值 target ,写一个函数搜索 nums 中的 target,如果目标值存在返回下标,否则返回 -1。 示例 阅读全文
posted @ 2020-03-26 14:38 花花妹子。 阅读(113) 评论(0) 推荐(0)
上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 34 下一页