leetcode.cn 2026-09-10
🟡2265.count-nodes-equal-to-average-of-subtree
🏷️ Tags
#tree #depth_first_search #binary_tree
🟡2265.count-nodes-equal-to-average-of-subtree
🏷️ Tags
#tree #depth_first_search #binary_tree
Telegraph
count-nodes-equal-to-average-of-subtree
给你一棵二叉树的根节点 root ,找出并返回满足要求的节点数,要求节点的值等于其 子树 中值的 平均值 。 注意:
leetcode.com 2026-09-10
🟡2265.count-nodes-equal-to-average-of-subtree
🏷️ Tags
#tree #depth_first_search #binary_tree
🟡2265.count-nodes-equal-to-average-of-subtree
🏷️ Tags
#tree #depth_first_search #binary_tree
Telegraph
count-nodes-equal-to-average-of-subtree
Given the root of a binary tree, return the number of nodes where the value of the node is equal to the average of the values in its subtree. Note:
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-15
🔴2472.maximum-number-of-non-overlapping-palindrome-substrings
🏷️ Tags
#greedy #two_pointers #string #dynamic_programming
🔴2472.maximum-number-of-non-overlapping-palindrome-substrings
🏷️ Tags
#greedy #two_pointers #string #dynamic_programming
Telegraph
maximum-number-of-non-overlapping-palindrome-substrings
给你一个字符串 s 和一个 正 整数 k 。 从字符串 s 中选出一组满足下述条件且 不重叠 的子字符串:
leetcode.com 2026-09-15
🔴2472.maximum-number-of-non-overlapping-palindrome-substrings
🏷️ Tags
#greedy #two_pointers #string #dynamic_programming
🔴2472.maximum-number-of-non-overlapping-palindrome-substrings
🏷️ Tags
#greedy #two_pointers #string #dynamic_programming
Telegraph
maximum-number-of-non-overlapping-palindrome-substrings
You are given a string s and a positive integer k. Select a set of non-overlapping substrings from the string s that satisfy the following conditions:
leetcode.cn 2026-09-16
🟡1621.number-of-sets-of-k-non-overlapping-line-segments
🏷️ Tags
#math #dynamic_programming #combinatorics #prefix_sum
🟡1621.number-of-sets-of-k-non-overlapping-line-segments
🏷️ Tags
#math #dynamic_programming #combinatorics #prefix_sum
Telegraph
number-of-sets-of-k-non-overlapping-line-segments
给你一维空间的 n 个点,其中第 i 个点(编号从 0 到 n-1)位于 x = i 处,请你找到 恰好 k 个不重叠 线段且每个线段至少覆盖两个点的方案数。线段的两个端点必须都是 整数坐标 。这 k 个线段不需要全部覆盖全部 n 个点,且它们的端点 可以 重合。 请你返回 k 个不重叠线段的方案数。由于答案可能很大,请将结果对 109 + 7 取余 后返回。 示例 1: 输入:n = 4, k = 2 输出:5 解释:如图所示,两个线段分别用红色和蓝色标出。 上图展示了 5 种不同的方案 {(0,2)…