随笔分类 - LeetCode
摘要:2021-06-21 LeetCode每日一题 链接:https://leetcode-cn.com/problems/binary-watch/ 标签:位运算、回溯 题目 二进制手表顶部有 4 个 LED 代表 小时(0-11),底部的 6 个 LED 代表 分钟(0-59)。每个 LED 代表一
阅读全文
摘要:2021-06-20 LeetCode每日一题 链接:https://leetcode-cn.com/problems/throne-inheritance/ 标签:树、先序遍历 题目 一个王国里住着国王、他的孩子们、他的孙子们等等。每一个时间点,这个家庭里有人出生也有人死亡。 这个王国有一个明确规
阅读全文
摘要:2021-06-18 LeetCode每日一题 链接:https://leetcode-cn.com/problems/smallest-good-base/ 标签:数学、二分查找 题目 对于给定的整数 n, 如果n的k(k>=2)进制数的所有数位全为1,则称 k(k>=2)是 n 的一个好进制。
阅读全文
摘要:2021-06-15 LeetCode每日一题 链接:https://leetcode-cn.com/problems/peak-index-in-a-mountain-array/ 标签:二分 题目 符合下列属性的数组 arr 称为 山脉数组 : arr.length >= 3 存在 i(0 <
阅读全文
摘要:2021-06-14 LeetCode每日一题 链接:https://leetcode-cn.com/problems/guess-number-higher-or-lower/ 标签:二分查找 题目 猜数字游戏的规则如下: 每轮游戏,我都会从 1 到 n 随机选择一个数字。 请你猜选出的是哪个数字
阅读全文
摘要:2021-06-13 LeetCode每日一题 链接:https://leetcode-cn.com/problems/first-bad-version/ 标签:二分查找 题目 你是产品经理,目前正在带领一个团队开发新的产品。不幸的是,你的产品的最新版本没有通过质量检测。由于每个版本都是基于之前的
阅读全文

浙公网安备 33010602011771号