上一页 1 ··· 4 5 6 7 8 9 10 11 下一页
摘要: 1300. 转变数组后最接近目标值的数组和 题目来源:力扣(LeetCode)https://leetcode-cn.com/problems/sum-of-mutated-array-closest-to-target 题目 给你一个整数数组 arr 和一个目标值 target ,请你返回一个整数 阅读全文
posted @ 2020-06-15 19:15 "大梦三千秋 阅读(185) 评论(0) 推荐(0) 编辑
摘要: 30. 串联所有单词的子串 题目来源:力扣(LeetCode)https://leetcode-cn.com/problems/substring-with-concatenation-of-all-words 题目 给定一个字符串 s 和一些长度相同的单词 words。找出 s 中恰好可以由 wo 阅读全文
posted @ 2020-06-13 16:14 "大梦三千秋 阅读(300) 评论(0) 推荐(0) 编辑
摘要: 739. 每日温度 题目来源:力扣(LeetCode)https://leetcode-cn.com/problems/daily-temperatures 题目 根据每日 气温 列表,请重新生成一个列表,对应位置的输出是需要再等待多久温度才会升高超过该日的天数。如果之后都不会升高,请在该位置用 0 阅读全文
posted @ 2020-06-11 18:21 "大梦三千秋 阅读(290) 评论(0) 推荐(0) 编辑
摘要: 128. 最长连续序列 题目 给定一个未排序的整数数组,找出最长连续序列的长度。 要求算法的时间复杂度为 O(n)。 示例: 输入: [100, 4, 200, 1, 3, 2] 输出: 4 解释: 最长连续序列是 [1, 2, 3, 4]。它的长度为 4。 解题思路 思路:哈希表 本题主要的难点在 阅读全文
posted @ 2020-06-10 18:42 "大梦三千秋 阅读(382) 评论(0) 推荐(0) 编辑
摘要: 面试题46. 把数字翻译成字符串 题目来源:力扣(LeetCode)https://leetcode-cn.com/problems/ba-shu-zi-fan-yi-cheng-zi-fu-chuan-lcof 题目 给定一个数字,我们按照如下规则把它翻译为字符串:0 翻译成 “a” ,1 翻译成 阅读全文
posted @ 2020-06-09 17:15 "大梦三千秋 阅读(341) 评论(0) 推荐(0) 编辑
摘要: 990. 等式方程的可满足性 题目来源:力扣(LeetCode)https://leetcode-cn.com/problems/satisfiability-of-equality-equations 题目 给定一个由表示变量之间关系的字符串方程组成的数组,每个字符串方程 equations[i] 阅读全文
posted @ 2020-06-08 18:42 "大梦三千秋 阅读(161) 评论(0) 推荐(0) 编辑
摘要: 238. 除自身以外数组的乘积 题目来源:力扣(LeetCode)https://leetcode-cn.com/problems/product-of-array-except-self 题目 给你一个长度为 n 的整数数组 nums,其中 n > 1,返回输出数组 output ,其中 outp 阅读全文
posted @ 2020-06-04 19:22 "大梦三千秋 阅读(196) 评论(0) 推荐(0) 编辑
摘要: 837. 新21点 题目来源:力扣(LeetCode)https://leetcode-cn.com/problems/new-21-game 题目 爱丽丝参与一个大致基于纸牌游戏 “21点” 规则的游戏,描述如下: 爱丽丝以 0 分开始,并在她的得分少于 K 分时抽取数字。 抽取时,她从 [1, 阅读全文
posted @ 2020-06-03 21:08 "大梦三千秋 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 使用逻辑运算符的短路性质,解决此问题 阅读全文
posted @ 2020-06-02 17:25 "大梦三千秋 阅读(184) 评论(0) 推荐(0) 编辑
摘要: 101. 对称二叉树 题目 给定一个二叉树,检查它是否是镜像对称的。 例如,二叉树 [1,2,2,3,4,4,3] 是对称的。 1 / \ 2 2 / \ / \ 3 4 4 3 但是下面这个 [1,2,2,null,3,null,3] 则不是镜像对称的: 1 / \ 2 2 \ \ 3 3 进阶: 阅读全文
posted @ 2020-05-31 17:48 "大梦三千秋 阅读(135) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 下一页