leetcode.cn 2025-04-22
🔴2338.count-the-number-of-ideal-arrays
🏷️ Tags
#math #dynamic_programming #combinatorics #number_theory
🔴2338.count-the-number-of-ideal-arrays
🏷️ Tags
#math #dynamic_programming #combinatorics #number_theory
Telegraph
count-the-number-of-ideal-arrays
给你两个整数 n 和 maxValue ,用于描述一个 理想数组 。 对于下标从 0 开始、长度为 n 的整数数组 arr ,如果满足以下条件,则认为该数组是一个 理想数组 :
leetcode.com 2025-04-22
🔴2338.count-the-number-of-ideal-arrays
🏷️ Tags
#math #dynamic_programming #combinatorics #number_theory
🔴2338.count-the-number-of-ideal-arrays
🏷️ Tags
#math #dynamic_programming #combinatorics #number_theory
Telegraph
count-the-number-of-ideal-arrays
You are given two integers n and maxValue, which are used to describe an ideal array. A 0-indexed integer array arr of length n is considered ideal if the following conditions hold:
leetcode.cn 2025-04-24
🟡2799.count-complete-subarrays-in-an-array
🏷️ Tags
#array #hash_table #sliding_window
🟡2799.count-complete-subarrays-in-an-array
🏷️ Tags
#array #hash_table #sliding_window
Telegraph
count-complete-subarrays-in-an-array
给你一个由 正 整数组成的数组 nums 。 如果数组中的某个子数组满足下述条件,则称之为 完全子数组 :
leetcode.com 2025-04-24
🟡2799.count-complete-subarrays-in-an-array
🏷️ Tags
#array #hash_table #sliding_window
🟡2799.count-complete-subarrays-in-an-array
🏷️ Tags
#array #hash_table #sliding_window
Telegraph
count-complete-subarrays-in-an-array
You are given an array nums consisting of positive integers. We call a subarray of an array complete if the following condition is satisfied:
leetcode.cn 2025-04-26
🔴2444.count-subarrays-with-fixed-bounds
🏷️ Tags
#queue #array #sliding_window #monotonic_queue
🔴2444.count-subarrays-with-fixed-bounds
🏷️ Tags
#queue #array #sliding_window #monotonic_queue
Telegraph
count-subarrays-with-fixed-bounds
给你一个整数数组 nums 和两个整数 minK 以及 maxK 。 nums 的定界子数组是满足下述条件的一个子数组:
leetcode.com 2025-04-26
🔴2444.count-subarrays-with-fixed-bounds
🏷️ Tags
#queue #array #sliding_window #monotonic_queue
🔴2444.count-subarrays-with-fixed-bounds
🏷️ Tags
#queue #array #sliding_window #monotonic_queue
Telegraph
count-subarrays-with-fixed-bounds
You are given an integer array nums and two integers minK and maxK. A fixed-bound subarray of nums is a subarray that satisfies the following conditions:
leetcode.cn 2025-04-28
🔴2302.count-subarrays-with-score-less-than-k
🏷️ Tags
#array #binary_search #prefix_sum #sliding_window
🔴2302.count-subarrays-with-score-less-than-k
🏷️ Tags
#array #binary_search #prefix_sum #sliding_window
Telegraph
count-subarrays-with-score-less-than-k
一个数组的 分数 定义为数组之和 乘以 数组的长度。
leetcode.com 2025-04-28
🔴2302.count-subarrays-with-score-less-than-k
🏷️ Tags
#array #binary_search #prefix_sum #sliding_window
🔴2302.count-subarrays-with-score-less-than-k
🏷️ Tags
#array #binary_search #prefix_sum #sliding_window
Telegraph
count-subarrays-with-score-less-than-k
The score of an array is defined as the product of its sum and its length.
leetcode.cn 2025-04-29
🟡2962.count-subarrays-where-max-element-appears-at-least-k-times
🏷️ Tags
#array #sliding_window
🟡2962.count-subarrays-where-max-element-appears-at-least-k-times
🏷️ Tags
#array #sliding_window
Telegraph
count-subarrays-where-max-element-appears-at-least-k-times
给你一个整数数组 nums 和一个 正整数 k 。 请你统计有多少满足 「 nums 中的 最大 元素」至少出现 k 次的子数组,并返回满足这一条件的子数组的数目。 子数组是数组中的一个连续元素序列。 示例 1: 输入:nums = [1,3,2,3,3], k = 2 输出:6 解释:包含元素 3 至少 2 次的子数组为:[1,3,2,3]、[1,3,2,3,3]、[3,2,3]、[3,2,3,3]、[2,3,3] 和 [3,3] 。 示例 2: 输入:nums = [1,4,2,1], k = 3…
leetcode.com 2025-04-29
🟡2962.count-subarrays-where-max-element-appears-at-least-k-times
🏷️ Tags
#array #sliding_window
🟡2962.count-subarrays-where-max-element-appears-at-least-k-times
🏷️ Tags
#array #sliding_window
Telegraph
count-subarrays-where-max-element-appears-at-least-k-times
You are given an integer array nums and a positive integer k. Return the number of subarrays where the maximum element of nums appears at least k times in that subarray. A subarray is a contiguous sequence of elements within an array. Example 1: Input:…
leetcode.cn 2025-05-01
🔴2071.maximum-number-of-tasks-you-can-assign
🏷️ Tags
#greedy #queue #array #binary_search #sorting #monotonic_queue
🔴2071.maximum-number-of-tasks-you-can-assign
🏷️ Tags
#greedy #queue #array #binary_search #sorting #monotonic_queue
Telegraph
maximum-number-of-tasks-you-can-assign
给你 n 个任务和 m 个工人。每个任务需要一定的力量值才能完成,需要的力量值保存在下标从 0 开始的整数数组 tasks 中,第 i 个任务需要 tasks[i] 的力量才能完成。每个工人的力量值保存在下标从 0 开始的整数数组 workers 中,第 j 个工人的力量值为 workers[j] 。每个工人只能完成 一个 任务,且力量值需要 大于等于 该任务的力量要求值(即 workers[j] >= tasks[i] )。 除此以外,你还有 pills 个神奇药丸,可以给 一个工人的力量值 增加 s…