leetcode.cn 2026-09-11
🟢3483.unique-3-digit-even-numbers
🏷️ Tags
#recursion #array #hash_table #enumeration
🟢3483.unique-3-digit-even-numbers
🏷️ Tags
#recursion #array #hash_table #enumeration
Telegraph
unique-3-digit-even-numbers
给你一个数字数组 digits,你需要从中选择三个数字组成一个三位偶数,你的任务是求出 不同 三位偶数的数量。 注意:每个数字在三位偶数中都只能使用 一次 ,并且 不能 有前导零。 示例 1: 输入: digits = [1,2,3,4] 输出: 12 解释: 可以形成的 12 个不同的三位偶数是 124,132,134,142,214,234,312,314,324,342,412 和 432。注意,不能形成 222,因为数字 2 只有一个。 示例 2: 输入: digits = [0,2,2] 输出:…
leetcode.com 2026-09-11
🟢3483.unique-3-digit-even-numbers
🏷️ Tags
#recursion #array #hash_table #enumeration
🟢3483.unique-3-digit-even-numbers
🏷️ Tags
#recursion #array #hash_table #enumeration
Telegraph
unique-3-digit-even-numbers
You are given an array of digits called digits. Your task is to determine the number of distinct three-digit even numbers that can be formed using these digits. Note: Each copy of a digit can only be used once per number, and there may not be leading zeros.…
leetcode.cn 2026-09-12
🔴3414.maximum-score-of-non-overlapping-intervals
🏷️ Tags
#array #binary_search #dynamic_programming #sorting
🔴3414.maximum-score-of-non-overlapping-intervals
🏷️ Tags
#array #binary_search #dynamic_programming #sorting
Telegraph
maximum-score-of-non-overlapping-intervals
给你一个二维整数数组 intervals,其中 intervals[i] = [li, ri, weighti]。区间 i 的起点为 li,终点为 ri,权重为 weighti。你最多可以选择 4 个互不重叠 的区间。所选择区间的 得分 定义为这些区间权重的总和。 返回一个至多包含 4 个下标且 字典序最小 的数组,表示从 intervals 中选中的互不重叠且得分最大的区间。
leetcode.com 2026-09-12
🔴3414.maximum-score-of-non-overlapping-intervals
🏷️ Tags
#array #binary_search #dynamic_programming #sorting
🔴3414.maximum-score-of-non-overlapping-intervals
🏷️ Tags
#array #binary_search #dynamic_programming #sorting
Telegraph
maximum-score-of-non-overlapping-intervals
You are given a 2D integer array intervals, where intervals[i] = [li, ri, weighti]. Interval i starts at position li and ends at ri, and has a weight of weighti. You can choose up to 4 non-overlapping intervals. The score of the chosen intervals is defined…
leetcode.cn 2026-09-17
🟡1477.find-two-non-overlapping-sub-arrays-each-with-target-sum
🏷️ Tags
#array #hash_table #binary_search #dynamic_programming #sliding_window
🟡1477.find-two-non-overlapping-sub-arrays-each-with-target-sum
🏷️ Tags
#array #hash_table #binary_search #dynamic_programming #sliding_window
Telegraph
find-two-non-overlapping-sub-arrays-each-with-target-sum
给你一个整数数组 arr 和一个整数值 target 。 请你在 arr 中找 两个互不重叠的子数组 且它们的和都等于 target 。可能会有多种方案,请你返回满足要求的两个子数组长度和的 最小值 。 请返回满足要求的最小长度和,如果无法找到这样的两个子数组,请返回 -1 。 示例 1: 输入:arr = [3,2,2,4,3], target = 3 输出:2 解释:只有两个子数组和为 3 ([3] 和 [3])。它们的长度和为 2 。 示例 2: 输入:arr = [7,3,4,7], target…
leetcode.com 2026-09-17
🟡1477.find-two-non-overlapping-sub-arrays-each-with-target-sum
🏷️ Tags
#array #hash_table #binary_search #dynamic_programming #sliding_window
🟡1477.find-two-non-overlapping-sub-arrays-each-with-target-sum
🏷️ Tags
#array #hash_table #binary_search #dynamic_programming #sliding_window
Telegraph
find-two-non-overlapping-sub-arrays-each-with-target-sum
You are given an array of integers arr and an integer target. You have to find two non-overlapping sub-arrays of arr each with a sum equal target. There can be multiple answers so you have to find an answer where the sum of the lengths of the two sub-arrays…
leetcode.cn 2026-09-23
🟡1658.minimum-operations-to-reduce-x-to-zero
🏷️ Tags
#array #hash_table #binary_search #prefix_sum #sliding_window
🟡1658.minimum-operations-to-reduce-x-to-zero
🏷️ Tags
#array #hash_table #binary_search #prefix_sum #sliding_window
Telegraph
minimum-operations-to-reduce-x-to-zero
给你一个整数数组 nums 和一个整数 x 。每一次操作时,你应当移除数组 nums 最左边或最右边的元素,然后从 x 中减去该元素的值。请注意,需要 修改 数组以供接下来的操作使用。 如果可以将 x 恰好 减到 0 ,返回 最小操作数 ;否则,返回 -1 。 示例 1: 输入:nums = [1,1,4,2,3], x = 5 输出:2 解释:最佳解决方案是移除后两个元素,将 x 减到 0 。 示例 2: 输入:nums = [5,6,7,8,9], x = 4 输出:-1 示例 3: 输入:nums…
leetcode.com 2026-09-23
🟡1658.minimum-operations-to-reduce-x-to-zero
🏷️ Tags
#array #hash_table #binary_search #prefix_sum #sliding_window
🟡1658.minimum-operations-to-reduce-x-to-zero
🏷️ Tags
#array #hash_table #binary_search #prefix_sum #sliding_window
Telegraph
minimum-operations-to-reduce-x-to-zero
You are given an integer array nums and an integer x. In one operation, you can either remove the leftmost or the rightmost element from the array nums and subtract its value from x. Note that this modifies the array for future operations. Return the minimum…