leetcode.cn 2025-11-04
🟢3318.find-x-sum-of-all-k-long-subarrays-i
🏷️ Tags
#array #hash_table #sliding_window #heap_priority_queue
🟢3318.find-x-sum-of-all-k-long-subarrays-i
🏷️ Tags
#array #hash_table #sliding_window #heap_priority_queue
Telegraph
find-x-sum-of-all-k-long-subarrays-i
给你一个由 n 个整数组成的数组 nums,以及两个整数 k 和 x。 数组的 x-sum 计算按照以下步骤进行:
leetcode.com 2025-11-04
🟢3318.find-x-sum-of-all-k-long-subarrays-i
🏷️ Tags
#array #hash_table #sliding_window #heap_priority_queue
🟢3318.find-x-sum-of-all-k-long-subarrays-i
🏷️ Tags
#array #hash_table #sliding_window #heap_priority_queue
Telegraph
find-x-sum-of-all-k-long-subarrays-i
You are given an array nums of n integers and two integers k and x. The x-sum of an array is calculated by the following procedure:
leetcode.cn 2025-11-05
🔴3321.find-x-sum-of-all-k-long-subarrays-ii
🏷️ Tags
#array #hash_table #sliding_window #heap_priority_queue
🔴3321.find-x-sum-of-all-k-long-subarrays-ii
🏷️ Tags
#array #hash_table #sliding_window #heap_priority_queue
Telegraph
find-x-sum-of-all-k-long-subarrays-ii
给你一个由 n 个整数组成的数组 nums,以及两个整数 k 和 x。 数组的 x-sum 计算按照以下步骤进行:
leetcode.com 2025-11-05
🔴3321.find-x-sum-of-all-k-long-subarrays-ii
🏷️ Tags
#array #hash_table #sliding_window #heap_priority_queue
🔴3321.find-x-sum-of-all-k-long-subarrays-ii
🏷️ Tags
#array #hash_table #sliding_window #heap_priority_queue
Telegraph
find-x-sum-of-all-k-long-subarrays-ii
You are given an array nums of n integers and two integers k and x. The x-sum of an array is calculated by the following procedure:
leetcode.cn 2025-11-07
🔴2528.maximize-the-minimum-powered-city
🏷️ Tags
#greedy #queue #array #binary_search #prefix_sum #sliding_window
🔴2528.maximize-the-minimum-powered-city
🏷️ Tags
#greedy #queue #array #binary_search #prefix_sum #sliding_window
Telegraph
maximize-the-minimum-powered-city
给你一个下标从 0 开始长度为 n 的整数数组 stations ,其中 stations[i] 表示第 i 座城市的供电站数目。 每个供电站可以在一定 范围 内给所有城市提供电力。换句话说,如果给定的范围是 r ,在城市 i 处的供电站可以给所有满足 |i - j| <= r 且 0 <= i, j <= n - 1 的城市 j 供电。
leetcode.com 2025-11-07
🔴2528.maximize-the-minimum-powered-city
🏷️ Tags
#greedy #queue #array #binary_search #prefix_sum #sliding_window
🔴2528.maximize-the-minimum-powered-city
🏷️ Tags
#greedy #queue #array #binary_search #prefix_sum #sliding_window
Telegraph
maximize-the-minimum-powered-city
You are given a 0-indexed integer array stations of length n, where stations[i] represents the number of power stations in the ith city. Each power station can provide power to every city in a fixed range. In other words, if the range is denoted by r, then…
leetcode.cn 2025-11-15
🟡3234.count-the-number-of-substrings-with-dominant-ones
🏷️ Tags
#string #enumeration #sliding_window
🟡3234.count-the-number-of-substrings-with-dominant-ones
🏷️ Tags
#string #enumeration #sliding_window
Telegraph
count-the-number-of-substrings-with-dominant-ones
给你一个二进制字符串 s。 请你统计并返回其中 1 显著 的 子字符串 的数量。 如果字符串中 1 的数量 大于或等于 0 的数量的 平方,则认为该字符串是一个 1 显著 的字符串 。 示例 1: 输入:s = "00011" 输出:5 解释: 1 显著的子字符串如下表所示。
leetcode.com 2025-11-15
🟡3234.count-the-number-of-substrings-with-dominant-ones
🏷️ Tags
#string #enumeration #sliding_window
🟡3234.count-the-number-of-substrings-with-dominant-ones
🏷️ Tags
#string #enumeration #sliding_window
Telegraph
count-the-number-of-substrings-with-dominant-ones
You are given a binary string s. Return the number of substrings with dominant ones. A string has dominant ones if the number of ones in the string is greater than or equal to the square of the number of zeros in the string. Example 1: Input: s = "00011"…
leetcode.cn 2025-12-06
🟡3578.count-partitions-with-max-min-difference-at-most-k
🏷️ Tags
#queue #array #dynamic_programming #prefix_sum #sliding_window #monotonic_queue
🟡3578.count-partitions-with-max-min-difference-at-most-k
🏷️ Tags
#queue #array #dynamic_programming #prefix_sum #sliding_window #monotonic_queue
Telegraph
count-partitions-with-max-min-difference-at-most-k
给你一个整数数组 nums 和一个整数 k。你的任务是将 nums 分割成一个或多个 非空 的连续子段,使得每个子段的 最大值 与 最小值 之间的差值 不超过 k。
leetcode.com 2025-12-06
🟡3578.count-partitions-with-max-min-difference-at-most-k
🏷️ Tags
#queue #array #dynamic_programming #prefix_sum #sliding_window #monotonic_queue
🟡3578.count-partitions-with-max-min-difference-at-most-k
🏷️ Tags
#queue #array #dynamic_programming #prefix_sum #sliding_window #monotonic_queue
Telegraph
count-partitions-with-max-min-difference-at-most-k
You are given an integer array nums and an integer k. Your task is to partition nums into one or more non-empty contiguous segments such that in each segment, the difference between its maximum and minimum elements is at most k. Return the total number of…
leetcode.cn 2025-12-18
🟡3652.best-time-to-buy-and-sell-stock-using-strategy
🏷️ Tags
#array #prefix_sum #sliding_window
🟡3652.best-time-to-buy-and-sell-stock-using-strategy
🏷️ Tags
#array #prefix_sum #sliding_window
Telegraph
best-time-to-buy-and-sell-stock-using-strategy
给你两个整数数组 prices 和 strategy,其中: