leetcode.com 2025-11-10
🟡3542.minimum-operations-to-convert-all-elements-to-zero
🏷️ Tags
#stack #greedy #array #hash_table #monotonic_stack
🟡3542.minimum-operations-to-convert-all-elements-to-zero
🏷️ Tags
#stack #greedy #array #hash_table #monotonic_stack
Telegraph
minimum-operations-to-convert-all-elements-to-zero
You are given an array nums of size n, consisting of non-negative integers. Your task is to apply some (possibly zero) operations on the array so that all elements become 0. In one operation, you can select a subarray [i, j] (where 0 <= i <= j < n) and set…
leetcode.cn 2025-11-12
🟡2654.minimum-number-of-operations-to-make-all-array-elements-equal-to-1
🏷️ Tags
#array #math #number_theory
🟡2654.minimum-number-of-operations-to-make-all-array-elements-equal-to-1
🏷️ Tags
#array #math #number_theory
Telegraph
minimum-number-of-operations-to-make-all-array-elements-equal-to-1
给你一个下标从 0 开始的 正 整数数组 nums 。你可以对数组执行以下操作 任意 次:
leetcode.com 2025-11-12
🟡2654.minimum-number-of-operations-to-make-all-array-elements-equal-to-1
🏷️ Tags
#array #math #number_theory
🟡2654.minimum-number-of-operations-to-make-all-array-elements-equal-to-1
🏷️ Tags
#array #math #number_theory
Telegraph
minimum-number-of-operations-to-make-all-array-elements-equal-to-1
You are given a 0-indexed array nums consisiting of positive integers. You can do the following operation on the array any number of times:
leetcode.cn 2025-11-13
🟡3228.maximum-number-of-operations-to-move-ones-to-the-end
🏷️ Tags
#greedy #string #counting
🟡3228.maximum-number-of-operations-to-move-ones-to-the-end
🏷️ Tags
#greedy #string #counting
Telegraph
maximum-number-of-operations-to-move-ones-to-the-end
给你一个 二进制字符串 s。 你可以对这个字符串执行 任意次 下述操作:
leetcode.com 2025-11-13
🟡3228.maximum-number-of-operations-to-move-ones-to-the-end
🏷️ Tags
#greedy #string #counting
🟡3228.maximum-number-of-operations-to-move-ones-to-the-end
🏷️ Tags
#greedy #string #counting
Telegraph
maximum-number-of-operations-to-move-ones-to-the-end
You are given a binary string s. You can perform the following operation on the string any number of times:
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-11-19
🟢2154.keep-multiplying-found-values-by-two
🏷️ Tags
#array #hash_table #sorting #simulation
🟢2154.keep-multiplying-found-values-by-two
🏷️ Tags
#array #hash_table #sorting #simulation
Telegraph
keep-multiplying-found-values-by-two
给你一个整数数组 nums ,另给你一个整数 original ,这是需要在 nums 中搜索的第一个数字。 接下来,你需要按下述步骤操作:
leetcode.com 2025-11-19
🟢2154.keep-multiplying-found-values-by-two
🏷️ Tags
#array #hash_table #sorting #simulation
🟢2154.keep-multiplying-found-values-by-two
🏷️ Tags
#array #hash_table #sorting #simulation
Telegraph
keep-multiplying-found-values-by-two
You are given an array of integers nums. You are also given an integer original which is the first number that needs to be searched for in nums. You then do the following steps: