随笔分类 - 力扣
摘要:1.题目 题目地址(187. 重复的DNA序列 - 力扣(LeetCode)) https://leetcode.cn/problems/repeated-dna-sequences/ 题目描述 DNA序列 由一系列核苷酸组成,缩写为 'A', 'C', 'G' 和 'T'.。 例如,"ACGAAT
阅读全文
摘要:1.题目 题目地址(81. 搜索旋转排序数组 II - 力扣(LeetCode)) https://leetcode.cn/problems/search-in-rotated-sorted-array-ii/ 题目描述 已知存在一个按非降序排列的整数数组 nums ,数组中的值不必互不相同。 在传
阅读全文
摘要:1.题目 题目地址(33. 搜索旋转排序数组 - 力扣(LeetCode)) https://leetcode.cn/problems/search-in-rotated-sorted-array/ 题目描述 整数数组 nums 按升序排列,数组中的值 互不相同 。 在传递给函数之前,nums 在预
阅读全文
摘要:1.题目 题目地址(278. 第一个错误的版本 - 力扣(LeetCode)) https://leetcode.cn/problems/first-bad-version/ 题目描述 你是产品经理,目前正在带领一个团队开发新的产品。不幸的是,你的产品的最新版本没有通过质量检测。由于每个版本都是基于
阅读全文
摘要:1.题目 题目地址(110. 平衡二叉树 - 力扣(LeetCode)) https://leetcode.cn/problems/balanced-binary-tree/ 题目描述 给定一个二叉树,判断它是否是 平衡二叉树 示例 1: 输入:root = [3,9,20,null,null,15
阅读全文
摘要:1.题目 题目地址(150. 逆波兰表达式求值 - 力扣(LeetCode)) https://leetcode.cn/problems/evaluate-reverse-polish-notation/ 题目描述 给你一个字符串数组 tokens ,表示一个根据 逆波兰表示法 表示的算术表达式。
阅读全文
摘要:1.题目介绍 题目地址(61. 旋转链表 - 力扣(LeetCode)) https://leetcode.cn/problems/rotate-list/ 题目描述 给你一个链表的头节点 head ,旋转链表,将链表每个节点向右移动 k 个位置。 示例 1: 输入:head = [1,2,3,4,
阅读全文
摘要:1.题目介绍 题目地址(322. 零钱兑换 - 力扣(LeetCode)) https://leetcode.cn/problems/coin-change/ 题目描述 给你一个整数数组 coins ,表示不同面额的硬币;以及一个整数 amount ,表示总金额。 计算并返回可以凑成总金额所需的 最
阅读全文
摘要:1.题目介绍 题目地址(714. 买卖股票的最佳时机含手续费 - 力扣(LeetCode)) https://leetcode.cn/problems/best-time-to-buy-and-sell-stock-with-transaction-fee/ 题目描述 给定一个整数数组 prices
阅读全文
摘要:1.题目 题目地址(122. 买卖股票的最佳时机 II - 力扣(LeetCode)) https://leetcode.cn/problems/best-time-to-buy-and-sell-stock-ii/ 题目描述 给你一个整数数组 prices ,其中 prices[i] 表示某支股票
阅读全文
摘要:1.题目 题目地址(121. 买卖股票的最佳时机 - 力扣(LeetCode)) https://leetcode.cn/problems/best-time-to-buy-and-sell-stock/ 题目描述 给定一个数组 prices ,它的第 i 个元素 prices[i] 表示一支给定股
阅读全文
摘要:1.题目介绍 题目地址(1630. 等差子数组 - 力扣(LeetCode)) https://leetcode.cn/problems/arithmetic-subarrays/ 题目描述 如果一个数列由至少两个元素组成,且每两个连续元素之间的差值都相同,那么这个序列就是 等差数列 。更正式地,数
阅读全文
摘要:1.题目介绍 题目地址(1705. 吃苹果的最大数目 - 力扣(LeetCode)) https://leetcode.cn/problems/maximum-number-of-eaten-apples/ 题目描述 有一棵特殊的苹果树,一连 n 天,每天都可以长出若干个苹果。在第 i 天,树上会长
阅读全文
摘要:1.题目 题目地址(621. 任务调度器 - 力扣(LeetCode)) https://leetcode.cn/problems/task-scheduler/ 题目描述 给你一个用字符数组 tasks 表示的 CPU 需要执行的任务列表,用字母 A 到 Z 表示,以及一个冷却时间 n。每个周期或
阅读全文
摘要:1.题目 题目地址(738. 单调递增的数字 - 力扣(LeetCode)) https://leetcode.cn/problems/monotone-increasing-digits/ 题目描述 当且仅当每个相邻位数上的数字 x 和 y 满足 x <= y 时,我们称这个整数是单调递增的。 给
阅读全文
摘要:1.题目介绍 题目地址(1353. 最多可以参加的会议数目 - 力扣(LeetCode)) https://leetcode.cn/problems/maximum-number-of-events-that-can-be-attended/ 题目描述 给你一个数组 events,其中 events
阅读全文
摘要:1.题目 题目地址(215. 数组中的第K个最大元素 - 力扣(LeetCode)) https://leetcode.cn/problems/kth-largest-element-in-an-array/ 题目描述 给定整数数组 nums 和整数 k,请返回数组中第 k 个最大的元素。 请注意,
阅读全文
摘要:题目地址(763. 划分字母区间 - 力扣(LeetCode)) https://leetcode.cn/problems/partition-labels/ 题目描述 给你一个字符串 s 。我们要把这个字符串划分为尽可能多的片段,同一字母最多出现在一个片段中。 注意,划分结果需要满足:将所有划分结
阅读全文
摘要:1.题目介绍 题目地址(452. 用最少数量的箭引爆气球 - 力扣(LeetCode)) https://leetcode.cn/problems/minimum-number-of-arrows-to-burst-balloons/ 题目描述 有一些球形气球贴在一堵用 XY 平面表示的墙面上。墙面
阅读全文
摘要:1.题目介绍 题目地址(435. 无重叠区间 - 力扣(LeetCode)) https://leetcode.cn/problems/non-overlapping-intervals/ 题目描述 给定一个区间的集合 intervals ,其中 intervals[i] = [starti, en
阅读全文