leetcode.com 2025-10-21
🟡3346.maximum-frequency-of-an-element-after-performing-operations-i
🏷️ Tags
#array #binary_search #prefix_sum #sorting #sliding_window
🟡3346.maximum-frequency-of-an-element-after-performing-operations-i
🏷️ Tags
#array #binary_search #prefix_sum #sorting #sliding_window
Telegraph
maximum-frequency-of-an-element-after-performing-operations-i
You are given an integer array nums and two integers k and numOperations. You must perform an operation numOperations times on nums, where in each operation you:
leetcode.cn 2025-10-22
🔴3347.maximum-frequency-of-an-element-after-performing-operations-ii
🏷️ Tags
#array #binary_search #prefix_sum #sorting #sliding_window
🔴3347.maximum-frequency-of-an-element-after-performing-operations-ii
🏷️ Tags
#array #binary_search #prefix_sum #sorting #sliding_window
Telegraph
maximum-frequency-of-an-element-after-performing-operations-ii
给你一个整数数组 nums 和两个整数 k 和 numOperations 。 你必须对 nums 执行 操作 numOperations 次。每次操作中,你可以:
leetcode.com 2025-10-22
🔴3347.maximum-frequency-of-an-element-after-performing-operations-ii
🏷️ Tags
#array #binary_search #prefix_sum #sorting #sliding_window
🔴3347.maximum-frequency-of-an-element-after-performing-operations-ii
🏷️ Tags
#array #binary_search #prefix_sum #sorting #sliding_window
Telegraph
maximum-frequency-of-an-element-after-performing-operations-ii
You are given an integer array nums and two integers k and numOperations. You must perform an operation numOperations times on nums, where in each operation you:
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-21
🟡1930.unique-length-3-palindromic-subsequences
🏷️ Tags
#bit_manipulation #hash_table #string #prefix_sum
🟡1930.unique-length-3-palindromic-subsequences
🏷️ Tags
#bit_manipulation #hash_table #string #prefix_sum
Telegraph
unique-length-3-palindromic-subsequences
给你一个字符串 s ,返回 s 中 长度为 3 的不同回文子序列 的个数。 即便存在多种方法来构建相同的子序列,但相同的子序列只计数一次。 回文 是正着读和反着读一样的字符串。 子序列 是由原字符串删除其中部分字符(也可以不删除)且不改变剩余字符之间相对顺序形成的一个新字符串。
leetcode.com 2025-11-21
🟡1930.unique-length-3-palindromic-subsequences
🏷️ Tags
#bit_manipulation #hash_table #string #prefix_sum
🟡1930.unique-length-3-palindromic-subsequences
🏷️ Tags
#bit_manipulation #hash_table #string #prefix_sum
Telegraph
unique-length-3-palindromic-subsequences
Given a string s, return the number of unique palindromes of length three that are a subsequence of s. Note that even if there are multiple ways to obtain the same subsequence, it is still only counted once. A palindrome is a string that reads the same forwards…
leetcode.cn 2025-11-27
🟡3381.maximum-subarray-sum-with-length-divisible-by-k
🏷️ Tags
#array #hash_table #prefix_sum
🟡3381.maximum-subarray-sum-with-length-divisible-by-k
🏷️ Tags
#array #hash_table #prefix_sum
Telegraph
maximum-subarray-sum-with-length-divisible-by-k
给你一个整数数组 nums 和一个整数 k 。
leetcode.com 2025-11-27
🟡3381.maximum-subarray-sum-with-length-divisible-by-k
🏷️ Tags
#array #hash_table #prefix_sum
🟡3381.maximum-subarray-sum-with-length-divisible-by-k
🏷️ Tags
#array #hash_table #prefix_sum
Telegraph
maximum-subarray-sum-with-length-divisible-by-k
You are given an array of integers nums and an integer k. Return the maximum sum of a subarray of nums, such that the size of the subarray is divisible by k. Example 1: Input: nums = [1,2], k = 1 Output: 3 Explanation: The subarray [1, 2] with sum 3 has…
leetcode.cn 2025-12-05
🟢3432.count-partitions-with-even-sum-difference
🏷️ Tags
#array #math #prefix_sum
🟢3432.count-partitions-with-even-sum-difference
🏷️ Tags
#array #math #prefix_sum
Telegraph
count-partitions-with-even-sum-difference
给你一个长度为 n 的整数数组 nums 。 分区 是指将数组按照下标 i (0 <= i < n - 1)划分成两个 非空 子数组,其中:
leetcode.com 2025-12-05
🟢3432.count-partitions-with-even-sum-difference
🏷️ Tags
#array #math #prefix_sum
🟢3432.count-partitions-with-even-sum-difference
🏷️ Tags
#array #math #prefix_sum
Telegraph
count-partitions-with-even-sum-difference
You are given an integer array nums of length n. A partition is defined as an index i where 0 <= i < n - 1, splitting the array into two non-empty subarrays such that:
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,其中: