leetcode.cn 2025-04-19
🟡2563.count-the-number-of-fair-pairs
🏷️ Tags
#array #two_pointers #binary_search #sorting
🟡2563.count-the-number-of-fair-pairs
🏷️ Tags
#array #two_pointers #binary_search #sorting
Telegraph
count-the-number-of-fair-pairs
给你一个下标从 0 开始、长度为 n 的整数数组 nums ,和两个整数 lower 和 upper ,返回 公平数对的数目 。 如果 (i, j) 数对满足以下情况,则认为它是一个 公平数对 :
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…